Binding.scala
Binding.scala copied to clipboard
FutureBinding compare with React hooks
I find it is similar in code and concept with React hooks and FutureBinding, example: https://beizhedenglong.github.io/react-hooks-lib/?path=/story/network-usefetch--get-demo If anyone can compare these two and give some comments?
React components, including class components and functional components, are unpredictable. They even provided a "strict-mode" to render components twice in order to ensure the developers do not depends on the timing or times to reevaluate a component.
On the other hand, Binding.scala is predictible. Recalculation happens at each .bind call, when the value changes.