hash-ir / hash-ir/full-stack-open
Avoid duplicate code in App and child components
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The following are the concerns:
- Components should focus on UI rendering
- mostly the case except for some components e.g. `Blog` where adding and removing a blog is replicated in App. All the blog functionality could be in its component and necessary information could be passed through props, stored in an external state or fetched through a context manager
- State management should be at the appropriate level
- currently handled with React Query and set up in `App`
- Set the token when a user logs in, rather than before each operation
- this is fixed in 9bf6d18d2b2e4453608f1433aca1d1efc2e66d90
- Mutations are best defined close to where they're used
- a bit tricky but as an alternative all mutations could be defined in a hooks file and then used appropriately in components
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.