News for hackers. Stuff that matters.
Re:Common Beginner Mistakes with React by sk0g on Sunday March 12, 2023 @06:16AM (#35118456)
No? External changes to variables trigger reloads too, it was quite a nice experience coming from back end and hobby game dev.

Now, the reactive blocks, where an update to _any_ variable used in them trigger the re-evaluation seemed rife for abuse - particularly when the variables could be brought in from other files, but I forget the mechanics behind that.

I used it plenty of course. Forgot how it worked the day after I stopped working on the project though.

For example, this file https://github.com/sk0g/peripheral-emulator-web-app/blob/mas...

Edit: unless you mean lines like `ultrasonicDetectedDistance.update(v => v = distance)`, which yeah was an interesting quirk. Not enough of a pain to go with something like React, thought that wouldn't meet the latency requirements for this project. TBF neither did Svelte entirely, but it got close.

There are no comments on this comment yet.