yarn run devand see an error in full page
yarn run build && yarn run startand see that works but throws an error in the console
It is expected that the
created hook is only executed once (from the SSR only) if the page is loaded from the server.
created hook is running on server-side AND client-side when loading a page.
If we mutate a variable in the
created, the server-side will do it correctly, but when the client-side will do it, as the variable has been already mutated, it will not recognize it and throw an error.
It throws a full-page error in dev environment but only displays an error in the console in prod.