codepod-io / codepod

Codepod IDE: Scalable Interactive Coding
https://codepod.io
MIT License
69 stars 16 forks source link

refactor: useStore! instead of checking for null #546

Closed lihebi closed 10 months ago

lihebi commented 10 months ago

We don't need to report the error. The error will be reported by zustand. Just keep in mind that the store is only valid inside a provided by RepoContext.Provider:

https://github.com/codepod-io/codepod/blob/79683dc6279b5086243dae5e155f33c1e32cb694/packages/ui/src/pages/repo.tsx#L451-L461