Actions cant work in jsx/tsx,but work in vue file #1596
Answered
by
kingzcheung
kingzcheung
asked this question in
Help and Questions
-
Reproductiontest_project.zip Steps to reproduce the bugIn vue file: <script setup>
import { storeToRefs } from "pinia";
import {usePathsStore} from './pania'
const store = usePathsStore()
const {paths} = storeToRefs(store)
store.getPaths('tris')
</script>
<template>
<div>
{{paths}}
</div>
</template> Expected behaviorIn jsx: import { defineComponent } from "vue";
import { usePathsStore } from './pania'
import { storeToRefs } from "pinia";
export default defineComponent({
setup() {
const store = usePathsStore()
const { paths } = storeToRefs(store)
store.getPaths('tris')
return {
paths
}
}
,
render() {
return (
<div>{this.paths}</div>
)
}
}); Actual behaviorAdditional informationNo response |
Beta Was this translation helpful? Give feedback.
Answered by
kingzcheung
Aug 28, 2022
Replies: 1 comment
-
My mistake. . . I was using jsx for the first time, I didn't know that it is completely different from the vue file。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kingzcheung
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My mistake. . . I was using jsx for the first time, I didn't know that it is completely different from the vue file。