Closed
Description
Describe the problem
Disallow function calls in useState
that aren't wrapped in an initializer function:
// Bad
const [value, setValue] = useState(generateTodos());
// Good
const [value, setValue] = useState(() => generateTodos());
Describe the solution you'd like
Port jsx-eslint/eslint-plugin-react#3579
Alternatives considered
No response
Additional context
No response