Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent < -- > Child relationships #71

Closed
jaygarcia opened this issue Feb 14, 2015 · 3 comments
Closed

Parent < -- > Child relationships #71

jaygarcia opened this issue Feb 14, 2015 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jaygarcia
Copy link
Contributor

Given that the concepts of Components are heavy in this toolset, I can't help but think of parent-child relationships and UI events.

I'm working on an example app that adds children to a parent via the parent's + button click, and removing children via the child's - button click.

The question becomes, how does a parent get notified that a child needs to be destroyed?

Parent: https://gist.github.com/jaygarcia/2157f7abac0a46449103
Child: https://gist.github.com/jaygarcia/af7cf118071b9c68c2eb

Demo: http://www.screencast.com/t/DGCKSQ8zYNU

@vjeux
Copy link
Contributor

vjeux commented Feb 14, 2015

You can check out the React documentation for this :) http://facebook.github.io/react/tips/communicate-between-components.html

@vjeux vjeux closed this as completed Feb 14, 2015
@jaygarcia
Copy link
Contributor Author

Thanks Dude! It took some studying of that example because the guide only spoke to native elements.

I figured it out though =).

Almost done w/ my blog example. Gotta get that auto-viewport-resize thing working.

@RockyF
Copy link

RockyF commented Oct 19, 2015

Do you know Context on React-native!

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants