Hey! I am Chris and I am a web developer from the UK. I create training courses and workshops to help developers level up their career and learn new skills.
And what do we need to add to make it work in production? It works on my local server but when I deploy it in GH Pages it does not redirect me to my routed component.
Thanks very much , however can one help me in fetching data from an api and use that same context of composables not any external state management (Vuex/pinia)
Hey Chris! Thanks for this video. In the next month I'll enter in a new company for a project which uses Vue1 and Vue2 and I wasn't clear on which one of the three I should learn. Today there are many Vue 3 tutorials but there are also nice Vue 2 content that is my choice for now.
Can I use pinia in the server? I wanna change a state of user, this state verify if the user is authenticated or not and then I want to use a Middleware for protection.
I don't believe you can inside of script setup. For this you could add the value inside of a separate composable file and import it where needed, or use provide/inject.
@@chrisdixon161 thanx. but after hard researching I found that use I can use ```getCurrentInstance``` . e.g: //declaration: app.config.globalProperties = { square(num){ return num*num; }, } <script setup> //calling: import { getCurrentInstance} from 'vue'; const { proxy } = getCurrentInstance(); console.log(proxy.square (4) ); //output 16 </script>