As a fun little exercise, I decided to port Miuki Miu’s (Elizabet Oliveira’s) adorable React Kawaii¹ to Kitten².

Going to write a blog post about the experience but, in the meanwhile, if you want to play with the cute little characters, here you go:

kitten-kawaii.small-web.org

And here’s the source code:

codeberg.org/aral/kitten-kawai

Things to try: the back and forward buttons ;)

¹ react-kawaii.vercel.app
² kitten.small-web.org

#Kitten #SmallWeb #React #BigWeb #porting #experiment #kawaii

Ooh, oops, looks like I introduced a little shared state between sessions… looking into it now :)

(If your character switches when you change the colour, etc., that’ll be why.)

Show thread

Right, fixed.

So genius here just kept state in global variables which were, of course, shared between all connections. 🤦‍♂️

(So you were all just changing the same character, colour, mood settings but the updates were only getting sent to you so when someone else changed something, your character would reflect those changes too and appear to jump.)

Anyway, long story short, moved state to the session object and it should be good now.

Patch: codeberg.org/aral/kitten-kawai

#Kitten #kawaii

Show thread
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.