In React I know next code call foo one time in mount
(...)
function foo() {
return {
id: 1,
text: 'hello',
}
}
const App = () => {
const [value, setter] = useState(foo);
(...)
but if I change the foo(useState's argument) to foo() this code call foo if App is rerendering.
I know the difference Between foo and foo() but I know why the difference is occur