I’m getting a list of items as a prop through the redux store. This prop is asyncronous.
My ListView works with syncronous hardcoded data. So the problem is populating with the prop when I actually receive it.
I’m making a ListView out of this item prop data. What’s the best practice on life cycle choices to setState with this prop? I’ve tried componentDidMount – but that’s too early and only called once. I tried componentWillReceiveprops – but that’s also too early since other props get there first. I also tried componentWillUpdate and no luck. I’m tempted to put it in the render function because I know I can grab that prop when I get it but that makes the render function no longer pure.
I am trying to figure out appropriate way to approach things like custom modals in react-native, i.e. overlay a view on top of another.
Additionally handle views that go of screen, do I need to set overflow hidden on parent view for this, should I use negative margins / absolute positioning or translate etc?
I saw some sources online explaining how to achieve these in various ways i.e. absolute positioning and z-indez or something called elevate, so I am not sure which of these is preferred? is it a good idea to use fixed positioning perhaps? And do parent views need their position to be set to relative?