You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the idea of using React as a view engine.
However I can't seem to find a good solution to pass data to nested components.
I don't want to pass everything to the topmost component and have that component "forward" that data to its children (and the children to their children...) (this is called prop drilling and is considered an anti pattern).
But I also don't want to use React's context api.
What I want is for every component to retrieve it's own data, but that would mean they have to contain logic to retrieve that data (like making api calls). What I want is something similar to PHP, where you usually include other php-files that contain view+logic and for example retrieve data from a database. This logic should of course not be visible to the client and only be executed serverside.
Do you have any idea how this could be done or how it may look like?
The text was updated successfully, but these errors were encountered:
I like the idea of using React as a view engine.
However I can't seem to find a good solution to pass data to nested components.
I don't want to pass everything to the topmost component and have that component "forward" that data to its children (and the children to their children...) (this is called prop drilling and is considered an anti pattern).
But I also don't want to use React's context api.
What I want is for every component to retrieve it's own data, but that would mean they have to contain logic to retrieve that data (like making api calls). What I want is something similar to PHP, where you usually include other php-files that contain view+logic and for example retrieve data from a database. This logic should of course not be visible to the client and only be executed serverside.
Do you have any idea how this could be done or how it may look like?
The text was updated successfully, but these errors were encountered: