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
As the app is starting to grow and we are welcoming new features, I suggest to add React's Context to handle global data to avoid using props on multiple hierarchy levels. We could also by the same occasion export the getFeed method to another file so all component have access to it. This way, we would avoid passing getFeed as props to every component.
In order to achieve this, we need to :
Create the context
Use an initial state with these data : the user's currently displayed feed , the user's previous feeds, the user's favorite feeds, the fetching state of the feed, and the error indicator. We suggest this format for the initial state :
Suggestion :
As the app is starting to grow and we are welcoming new features, I suggest to add React's Context to handle global data to avoid using props on multiple hierarchy levels. We could also by the same occasion export the getFeed method to another file so all component have access to it. This way, we would avoid passing getFeed as props to every component.
In order to achieve this, we need to :
The text was updated successfully, but these errors were encountered: