vue component doesn’t update after state changes in pinia store

storeToRefs() You need to use storeToRefs() to extract properties from the store while keeping those properties reactive. import { storeToRefs } from ‘pinia’ const themeStore = useThemeStore(); const { isDark } = storeToRefs(themeStore); Computed property Thanks to @Fennec for suggesting the computed way of getting reactive state. Although I don’t recommend this method since there … Read more

What is better in Vue, v-if or v-show?

tl;dr Assuming the question is strictly about performance: v-show: expensive initial load, cheap toggling, v-if: cheap initial load, expensive toggling. Evan You provided a more in depth answer at VueJS Forum v-show always compiles and renders everything – it simply adds the “display: none” style to the element. It has a higher initial load cost, … Read more

How can I read http errors when responseType is blob in Axios with VueJs? [duplicate]

The reason is that the response type is blob. In case of error, the status code is available directly in your exception object. However, the response is a promise. What you need to do is: .catch((error) => { let statusCode = error.response.status let responseObj = await error.response.data.text(); : : For more details you can read … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)