fishy @fishies.dev · Jun 7

React in #godot now has object ID-based movement! Previously, it would diff the virtual trees on attributes alone. The colored squares get a random color each time they are instantiated, so the color "stay behind" despite the cells appearing to move.

6 likes 3 replies

?

Replies

Evangeline Rome · Jun 8

I assume it's hard to recognize the presence of React in there because the video demo doesn't leave much screentime for studying the code, and from only a glance, we see no JSX and don't recognize it as React

fishy · Jun 7

Each list item is its own HBoxContainer, all stacked in a VBoxContainer. Were you to write this manually without a stateful aid like this, you would use Node.move_child to move each element up and down. Now, the runtime is smart enough to do it itself (provided can you provide a unique ID)

@hedgehoggolf.itch.io · Jun 8

It's not actually React, right? It's a reactive library?