Skip to content
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

Make vuex usable in react, react-native #2149

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

visitsb
Copy link

@visitsb visitsb commented Mar 25, 2022

Using Vuex outside of Vue projects looks possible with a few simple changes. Vuex works independently only using few imports from @vue/reactivity and @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.

@netlify
Copy link

netlify bot commented Mar 25, 2022

Deploy Preview for vuex-docs ready!

Name Link
🔨 Latest commit 27c8ca7
🔍 Latest deploy log https://app.netlify.com/sites/vuex-docs/deploys/624eb11565972600082f9a47
😎 Deploy Preview https://deploy-preview-2149--vuex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@visitsb
Copy link
Author

visitsb commented Apr 7, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant