Description
It seemed like a good idea to start. Separate state into different "contexts". Just use `useState`. Then, `useEffect` and multiple if branches snuck in and it became a nightmare.
Summary
- The AuthContext contains state associated with authentication.
- Both the AuthContext and TimelineContext are part of the global state so one solution would be to just combine them, and separate the domains inside the state object.
- Defining our initial state lets us see all of our global state at a glance.
- Now, we can set an initialSelectedPost & initialSelectedComment without worrying about the useEffect firing off;