React app made for fun.
It's a simple CRA app, so:
- install:
npm install
- start:
npm start
- test:
npm test
- The implementation is in-memory: state is maintained at root level, navigating with browser history (browser back/forward buttons) works, hard refresh wipes app content
- I'm not using Redux or any other state management library because I thought it was overkill. I used a
useReducer
hook at the top level where I have the majority of the logic for updating state
- when editing a user, clicking on
new friend
once and then again on the appearing window, won't list the original edited users between friends available to select (it's fine on the first window since I wanted to treat the relationship as implicit) - review variable names (e.g.:
openNewFriendWindow
inUserForm.tsx
) - test error cases for
UserForm
(test that all exceptions generated by thesaveFunction
have an effect on the UI) - write better tests for
UserFormManager
- show message to user on save/update