You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -719,7 +719,7 @@ The requirement is to display special kinds of buttons you can click to shop for
719
719
- If the category has no items available, the button's background should be `grey`
720
720
- If the category is booked, the button's background should be `green`
721
721
- If the category has available items and is not booked, the button's background should be `red`
722
-
- For each category, it's corresponding button has a unique label and icon
722
+
- For each category, its corresponding button has a unique label and icon
723
723
724
724
---
725
725
@@ -940,8 +940,8 @@ See also: [KCD: AHA Programming](https://kentcdodds.com/blog/aha-programming), [
940
940
3.Ifyou're going to use `React.memo`, `useMemo`, and `useCallback` for reducing re-renders, they shouldn'thavemanydependenciesandthedependenciesshouldbemostlyprimitivetypes.
941
941
4.Makesureyour`React.memo`, `useCallback`or`useMemo`isdoingwhatyouthinkit's doing (is it really preventing rerendering? Can you demonstrate empirically that using them on your case has significant performance gains? [Memoization can sometimes make your app worse](https://kentcdodds.com/blog/usememo-and-usecallback), so keep an eye on that!)
6.Puttingyourstateascloseaspossibletowhereit's being used will not only make your code so much easier to read but It would also make your app faster (state colocation)
944
-
7.`Context`shouldbelogicallyseparated, donotaddtomanyvaluesinonecontextprovider. Ifanyofthevaluesofyourcontextchanges, allcomponentsconsumingthatcontextalsorerendersevenifthosecomponentsdon't use the specific value that was actually changed.
943
+
6.Puttingyourstateascloseaspossibletowhereit's being used will not only make your code so much easier to read but it would also make your app faster (state colocation)
944
+
7.`Context`shouldbelogicallyseparated, donotaddtoomanyvaluesinonecontextprovider. Ifanyofthevaluesofyourcontextchanges, allcomponentsconsumingthatcontextalsorerendersevenifthosecomponentsdon't use the specific value that was actually changed.
9. Know the terms [`lazy loading`](https://nextjs.org/docs/advanced-features/dynamic-import) and [`bundle/code splitting`](https://reactjs.org/docs/code-splitting.html)
947
947
10.Windowlargelists (with [`tannerlinsley/react-virtual`](https://github.com/tannerlinsley/react-virtual) or similar)
@@ -973,7 +973,7 @@ See also: [KCD: AHA Programming](https://kentcdodds.com/blog/aha-programming), [
973
973
2.Makesurethatyou're not testing implementation details - things which users do not use, see, or even know about
974
974
3.Ifyourtestsdon't make you confident that you didn'tbreakanything, thentheydidn't do their (one and only) job
975
975
5. You'll know you implemented correct tests when you rarely have to change tests when you refactor code given the same user behavior
976
-
5. Forthefront-end, youdon't need 100% code coverage, about 70% is probably good enough. Tests should make you more productive not slow you down. Maintaining tests can slow you down. You get dimishing returns on adding more tests after a certain point
976
+
5. Forthefront-end, youdon't need 100% code coverage, about 70% is probably good enough. Tests should make you more productive not slow you down. Maintaining tests can slow you down. You get diminishing returns on adding more tests after a certain point
977
977
6. Ilikeusing [Jest](https://jestjs.io/), [React testing library](https://testing-library.com/docs/react-testing-library/intro/), [Cypress](https://www.cypress.io/), and [Mock service worker](https://github.com/mswjs/msw)
0 commit comments