Skip to content

Store implementation #61

Answered by ElMassimo
MichaelPrecel asked this question in Q&A
Discussion options

You must be logged in to vote

Disclaimer: for a larger e-commerce website Nuxt 3 is likely a better fit.


Since îles is based on Vue 3 and encourages you to use script setup, using Pinia should feel very natural.

There's two different use cases for stores in îles:

Using it only during generation

  • You can use enhanceApp to add Vuex or Pinia to the app
  • Then, pass any data you need inside islands explicitly using props or slots.

Sharing a store between islands

  • This is probably what you are asking about
  • Since each island is a separate app (if you are using Vue, a separate Vue app), rather than installing Pinia on each one, you would directly import a Pinia store or reactive object containing all data that should be shar…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ElMassimo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #60 on December 18, 2021 15:09.