Answer
useState(() => ...) runs the initializer only once during the first render, avoiding repeated expensive computations on every render.
Sign in to access all features and personalize your learning experience.
Source: SugharaIQ