Learn about the basics of React Hooks, focus on useReducer & useState hooks.
First, change the initial state management of the app in App.tsx so every time the app refreshes it will start in React Hooks
mode.
- Start by knowing the action types here.
- Fill the gaps in Hooks-app, you need to complete the reducer and use React Hooks inside
HooksApp
function (specifics in the file). - Reset the follower batch index after getting new user in stalk-form.tsx.
- Set the user properly in stalk-form by using the hook injected to this component.
- Fill the gaps in follower-list, use the dispatch function inserted to this component in order to init the first followers and add additional followers.
- Verify that you can submit and get the user information as defined in App Usage - Our Goal.
If all went well, by now you should be able to submit and fetch a list of followers for the user.
Bonus:
- Set the sorting function in stalk-form