I tried using zustand for light/dark themes for the first time and learned a lot from it. It was a great extra challenge.
I think I was lazy with semantics in the code, particulary the css variables, which I realised as I was trying to add transitions for the light/dark themes and couldn't easy tell apart which colors were used where. So I would aim to make things like that more semantically obvious in my code.
What challenges did you encounter, and how did you overcome them?I wanted to add in the light/dark theme mode but didn't know how to share the state around the app without prop drilling or using react context (which I am not a fan of using due to all the providers and junk to write) which is why I needed another more stream lined way... that's where zustand came in to the picture. Luckily it's not a huge learning curve but definetly has some unusual bits in it like set(), get(), currying functional syntax when writing in typescript and some other things. But definetly a great opportunity to be exposed to new things and I want to get more comfortable using zustand in the future.
What specific areas of your project would you like help with?If any one has their own way to organise css variables or thinks that the way I wrote or organised code was strange, I would love to hear about your way of doing it instead so I can see what else is available.
Thank you!