|
|
|
|
|
by rictic
271 days ago
|
|
Yeah, that's vanilla syntax. The semantics are fairly magic though. The component function that calls useState though isn't a normal function, it's a function that must be called in a special way by the React runtime in order to line up all of the hidden state that React maintains so that it can magically infer the data that your `useState` call maps to and then there's more magic to maintain the lifetime of that data. |
|
Next you're going to complain about the fact that the compiler handles static variables with controlled allocations for you in C.
Like there's no rational basis for your complaints or critique other than grandstanding.