https://github.com/ryanclementshax/vue-compat-vuex-bug
A repo demonstrating a problem when upgrading from vue 2.x to 3.x when vuex is used in the project
https://github.com/ryanclementshax/vue-compat-vuex-bug
Last synced: 3 months ago
JSON representation
A repo demonstrating a problem when upgrading from vue 2.x to 3.x when vuex is used in the project
- Host: GitHub
- URL: https://github.com/ryanclementshax/vue-compat-vuex-bug
- Owner: RyanClementsHax
- Created: 2021-06-03T22:03:55.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-03T22:09:33.000Z (about 5 years ago)
- Last Synced: 2024-10-06T07:41:18.017Z (over 1 year ago)
- Language: Vue
- Size: 142 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-compat-vuex-bug
This repo takes a default vue 2.x app with vuex and follows the steps outlined in the [@vue/compat upgrade workflow instructions](https://www.npmjs.com/package/@vue/compat#upgrade-workflow). This repo shows that when started, the following will appear in the console:
```
vue.runtime.esm-bundler.js?1786:1404 Uncaught TypeError: Cannot read property 'state' of undefined
at Proxy.mappedState (vuex.esm.js?2f62:945)
at ComputedRefImpl.reactiveEffect [as effect] (vue.runtime.esm-bundler.js?1786:343)
at ComputedRefImpl.get value [as value] (vue.runtime.esm-bundler.js?1786:1165)
at Object.get [as counter] (vue.runtime.esm-bundler.js?1786:4515)
at Object.get (vue.runtime.esm-bundler.js?1786:9487)
at Proxy.eval (HelloWorld.vue?fdab:3)
at renderComponentRoot (vue.runtime.esm-bundler.js?1786:2550)
at componentEffect (vue.runtime.esm-bundler.js?1786:7280)
at reactiveEffect (vue.runtime.esm-bundler.js?1786:343)
at effect (vue.runtime.esm-bundler.js?1786:318)
```
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```