https://github.com/viur-framework/shop-components
https://github.com/viur-framework/shop-components
viur viur-shop vuejs
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/viur-framework/shop-components
- Owner: viur-framework
- License: mit
- Created: 2024-03-27T19:54:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-11T18:24:42.000Z (about 2 months ago)
- Last Synced: 2025-04-11T19:37:11.881Z (about 2 months ago)
- Topics: viur, viur-shop, vuejs
- Language: Vue
- Homepage:
- Size: 5 MB
- Stars: 2
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Structure
* **Main components** have to be exported in `./src/main.js`. Main Components should be in folder `./src/components`.
* **Ui Elements** for main components should be in `./src/components/ui` so everyone who contributes can see if there is an element/component already for their use.
* Components should be as small as possible to make the code easier to access and understand, thats why the directory structure has importance.
* Every logic/function according to articles/items/cart or anything else should be in the `cartStore` in `./src/stores/cart.js` - reason is as follows - all components get their data with so called props which are not "reactive" by nature. We want to trigger a rerender if we change/add/edit... items thats why anything according to that should be in the cartStore. Read the cartStore carefully and use the already existing states to grant a clean rerender/reactive process. The props all get updated as soon as the main states get updated in the `cartStore` -> rerender --> profit...Try to understand this structure and adopt it with new components for easy implementation without much effort.
Real documentation is coming soon...