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

add feature to pass props from getIntialProps to child component #5314

Closed
kyashrathore opened this issue Sep 27, 2018 · 3 comments
Closed

add feature to pass props from getIntialProps to child component #5314

kyashrathore opened this issue Sep 27, 2018 · 3 comments

Comments

@kyashrathore
Copy link

Feature request

Is your feature request related to a problem? Please describe.

I am making a app which gets all data from firebase database on initial load and then use it many child components , so when I fetch data in getInitialProps I can only use it in that page only and can not pass it to child component . I mean I can pass but empty html tags will be sent to source html and then it will populated with content , which I think is not the purpose of nextjs.

Describe the solution you'd like

I want returned object from getIntialProps should be sent to client the way it is used in the app formated in html , in all of child components also . and no NEXTDATA kind of thing should be shipped to client

Describe alternatives you've considered

I didn't find a solution to what I actually want

Additional context

Add any other context or screenshots about the feature request here.

@kyashrathore
Copy link
Author

I was maping props in componentdidmount in child component which was causing unexpected behaviour

@KyrolosMagdy
Copy link

yea I guess that I 'm facing the same problem right now

@heshamelmasry77
Copy link

Same here and I don't know what to do. Move back to CRA :s

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants