It has been a while since Vue 3 was fully released, but one concept that still stumps newcomers to the framework is understanding the key differences between ref
and reactive
when working with the composition API.
I don’t want to do a complete rewrite of the docs, so let’s first get out of the way the more “obvious” difference, or the key one that absolute everyone must understand before working with these two.
Why write ref and active?
ref
is used to create a reactive reference to a value.reactive
is used to create a reactive object.
Why react is better than vue
React is better than vue because of the following reasons:
- React is more popular than vue
- React has a larger community
- React has more job opportunities
- React has more libraries
But why to do it?
The params key of every returned object tells Astro what routes to build. The returned params must map back to the dynamic parameters and rest parameters defined in your component filepath.
params are encoded into the URL, so only strings are supported as values. The value for each params object must match the parameters used in the page name.
For example, suppose that you have a page at src/pages/posts/[id].astro. If you export getStaticPaths from this page and return the following for paths: It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.