-
-
Couldn't load subscription status.
- Fork 9.6k
Make vuex usable in react, react-native #2149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vuex-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
@yyx990803 , @ktsn , @kiaking I understand Vuex is now in maintenance, and recommending Pinia. Since this PR doesn't look like going to merge into Vuex anytime soon, I have gone ahead and publish a fork under @visitsb/vuex so that non-Vue.js applications such as React, ReactJS and React Native can use Vuex. |
Using Vuex outside of Vue projects looks possible with a few simple changes. Vuex works independently only using few imports from
@vue/reactivityand@vue/runtime-core. Switching these to pure imports removes the need to import them through Vue.@yyx990803, @ktsn, @kiaking - I have managed to use Vuex store successfully in a react-native project after making these changes. The best part is it works according to Vuex documentation.
It will great if these changes make it to mainline branch. Love to use Vuex over other state management libraries in React ecosystem.