bgevko / bogdan-os

MIT License
0 stars 0 forks source link

Hot reload issue with Vite #2

Closed bgevko closed 3 months ago

bgevko commented 3 months ago

When saving changes, sometimes Vite doesn't hot reload.

The issue is likely coming from ProcessNode, FileNode, and/or FileSystemTrie class objects.

Re-examine how the inner methods are updating the state and make sure that Zustand is aware of all state changes.

bgevko commented 3 months ago

The issue wasn't from the class objects, but it turns out, those were causing an unrelated issue with state updates. The hot reloading issue came from not naming my hooks in CamelCase.

I did end up backing out of class-based state, as it was too complicated to manage correctly, and I did rename the conflicting modules. This seems to have fixed the issue.