Every section of the documentation (v0.2), part 1 of 2
Every page and section title, linked to its page. Search the full documentation for a specific topic.
Search documentation →Typical React mistakes — Coming from React: the typical mistakes and what Luxel says
1. A counter in component state2. UseEffect to load data after mount3. OnClick that updates state4. A controlled input with onChange5. A line total computed in JSX (qty × price)6. Fetch the data inside the component7. Map with logic (render only the active items)8. An inline style object9. A link whose href is built from the item10. A className chosen from the item's data11. Import React12. A plain ‹button> element13. Key on the mapped child instead of itemKey14. DangerouslySetInnerHTML for formatted text15. Read the session in the component (next-auth)16. Navigate with useRouter (Next.js)17. An async server component that awaits its data18. Today's date computed in the component19. Money formatted in JSX (cents / 100, toFixed)20. UseMemo for a derived total21. Read a preference from localStorage22. OnSubmit on the form23. An input's value set from a variable24. A ref to focus an input25. An environment variable read in the component26. Read the URL from window.location