hodovani / hodovani.github.io

A collection of personal notes
https://matvii.hodovani.uk/
13 stars 3 forks source link

React app check list #17

Closed hodovani closed 3 years ago

hodovani commented 3 years ago

React app Structure

Create-app

Linting

React

Use hooks Lazy load and Suspense from React component if it is more than 30kb size

React router

Clear instructions how to add new route. Nested routes that handle state views

Typescript

Clear instructions on how to deal with new types

State managment

Redux Clear instruction how to add new actions. How to bind a component to a reducer store. HOC connect to connect new component to store. Map state to props, map dispatch to prop Thunk or Saga or other side effect library Clear instructions on how to add new api request. Redux-persist to sync state with local storage. Clear persist on error Keep Redux actions and async operations out of your reducer Connection component makes it less reusable. You should connect only a Wrapper component? Yes, we should have a parent component that is connected to a right data and then pass it to a component Devtools extension Wrap requests in try-catch blocks Create a selector that is a wrapper function that takes data from a store. We can also use reselect library to combine selectors

Testing

Tests shouldn’t care whether your component connected to a store or not. Unit tests E2E tests Snapshot testing Test thunks Test reducers Test selectors Collect test coverage Do not write tests to things that can change rapidly

Accesebility

Documentation

Instructions on how to make commit

Design System

Skeletons to show while loading StyledComponents Styleguide

hodovani commented 3 years ago

relevant points moved here https://github.com/hodovani/hodovani.github.io/tree/master/checklists