Amazing talk! I'm not familiar with React, and I feel that many ideas here are inspired by reactive programming. It's nice to see how plain OCaml features can support all this stuff :)
About the React code example at 6:11, typically you would write setCount(count => count + 1), which gives you the expected behavior. (To clarify, with the empty dependency array passed to useEffect, it is not executing the code once as said, but repeatedly setting the count to 1 every second, because it is referencing the initial value of count captured by the closure.)
If you're unsure what a signal is, and what to do with it, this is a great talk to watch! Btw, if you want to help us reach more people, you definitely want to like and subscribe. 🧡🐫
Amazing talk! I'm not familiar with React, and I feel that many ideas here are inspired by reactive programming. It's nice to see how plain OCaml features can support all this stuff :)
About the React code example at 6:11, typically you would write setCount(count => count + 1), which gives you the expected behavior. (To clarify, with the empty dependency array passed to useEffect, it is not executing the code once as said, but repeatedly setting the count to 1 every second, because it is referencing the initial value of count captured by the closure.)
If you're unsure what a signal is, and what to do with it, this is a great talk to watch!
Btw, if you want to help us reach more people, you definitely want to like and subscribe. 🧡🐫
h