The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

React Native: Build a Separator UI component

React Native: Build a Separator UI component

2:02
In this lesson we'll create a reusable React Native separator component which manages it's own styles.
Watch this lesson now
Avatar
egghead.io

In this lesson we'll create a reusable React Native separator component which manages it's own styles.

Avatar
Peter

I started getting an error "cannot adjust current top of stack beyond available views" which drove me crazy for about an hour. After painstakingly comparing my code to the github repository, I realized I misspelled "Separator" (actually you misspelled it :-) ) and when it came time to use it in render, I spelled it correctly. The two names didn't match and I got that error.
http://stackoverflow.com/questions/30007008/react-native-on-ios-cannot-adjust-current-top-of-stack-beyond-available-views

In reply to egghead.io
Avatar
Tyler

Hi Peter. Good catch. Sorry about that. Looks like the video got it right but not the repo. I made the fix.

In reply to Peter
Avatar
Charles

Could you tell us how you get autocomplete at 1:30?

Thanks

Avatar
Tyler

I cut out the part of me typing it all out so the video flows easier and the viewer doesn't have to sit and watch me type :) I agree though, that would be an awesome IDE feature.

In reply to Charles
Avatar
Charles

Thanks for the quick reply!

I have another question. I had React.propType.object.isRequired instead of React.PropType.object.isRequired (minor typo) and it was really difficult for me to debug. The exception error did not give me any information about whereabouts the error was occurring. The stack trace was useless. The exception I got was "Cannot read property 'object' of undefined." Is this just the current state of React/React-native or am I missing something?

Avatar
Charles

Nvm! I was able to locate what was causing the error by Enabling "Pause On Caught Exceptions" on Chrome Debugger and stepping through it.

In reply to Charles
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?