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

React Context, content as function, why? #17

Open
merlinstardust opened this issue May 21, 2016 · 1 comment
Open

React Context, content as function, why? #17

merlinstardust opened this issue May 21, 2016 · 1 comment

Comments

@merlinstardust
Copy link

To use this for a Layout, you have two examples. One option is to just set content to a particular component (content: <WelcomeComponent name="Arunoda" />) and the other is to set content to a function returning the component (content: () => (<WelcomeComponent name="Arunoda" />)).

You mention that this second option is to use the React context but what is that? Why is this necessary? They seem to both result in the same thing

@abuddenb
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants