Comment by thomasfromcdnjs

Comment by thomasfromcdnjs 7 hours ago

2 replies

They kind of are not though, you can't call them out of order and other things which is checked at runtime by the React "engine" and will stop script execution. If they were regular functions you could call them anytime.

b_e_n_t_o_n 5 hours ago

Many "regular" functions are context dependent.

  • DangitBobby 4 hours ago

    They are context dependent, must execute in the same order every time, and must be called every time the component re-renders (i.e., they do not support conditional calls). They have enough gremlin rules that calling them "just functions" is unhelpful for reasoning about using them.