optimizing code for change - nomastickles/react-reducers GitHub Wiki

๐Ÿ’ฅ typescript

๐Ÿ’ฅ yarn

yarn create react-app react-typescript-redux-rtk --template redux-typescript

๐Ÿ’ฅ https://redux-toolkit.js.org/

^ use this with or without redux to create easy flexible reducer patterns from top to bottom. redux is amazing however the game is more about capitalizing on the reducer/flux pattern than anything. the pub sub pattern is powerful. use useState only for simple things otherwise use redux or useReducer.

๐Ÿ’ฅ https://github.com/nomastickles/react-reducers

useReducer + useContext is a great alernative to redux for non system wide components.

๐Ÿ’ฅ https://github.com/reduxjs/reselect

^ use this to memoize redux selectors. Hint: this + useSelector with lodash.isEqual = โšก๏ธโšก๏ธ

๐Ÿ’ฅ https://testing-library.com/docs/react-testing-library/intro/

^ awesome.

๐Ÿ’ฅ ๐Ÿ“š ways to code:

https://kentcdodds.com/blog/aha-programming

^ when we make code, the only thing we can do is optimize for change.

https://kentcdodds.com/blog/usememo-and-usecallback

^ don't memoize if you don't have to. more code is more code.

https://en.wikipedia.org/wiki/Conway%27s_law

^ code organization always follows its human communication organization

๐Ÿ’ฅ ๐Ÿงช ways to test:

https://kentcdodds.com/blog/common-mistakes-with-react-testing-library

https://medium.com/@lucksp_22012/dont-use-mock-store-use-your-real-store-b319d7e4e22e