React Reference
Reference pages for React — syntax, parameters, return values and runnable examples.
All React reference pages
useEffect
The useEffect hook runs a setup function after the component renders, re-running it when its dependencies change and calling an optional cleanup function before the next run or on unmount.
useState
The useState hook adds a piece of state to a function component. It takes an initialState and returns the current state paired with a setState function that updates it and re-renders the component.
This is the React reference on XCODX. Each page documents one feature completely — the exact syntax, its parameters and return value, the gotchas that trip people up, and runnable examples you can edit right on the page.
The pages below are grouped so related topics stay together. Pick one to dive in, or run anything you find in the React online compiler.