Jolaolu / blocks-shop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

credits

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Run your unit tests

yarn test:unit

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.

Decision/Thoughts.

  • Adding state management will probably make the code look cleaner but imo its an over kill for the project also composition API takes away the "cleanliness" the Options API ordinarily gives :).
  • I decided against having a multi-route app as the scope of the work is considerably small, making routing pretty useless.
  • I went with using Composition APi in the latest Vue version(2.7) to see how it compares against using Vue2 with the composition api package and Vue3.
  • I defaulted to not caching the the cart items, in a "real world" scenario i would save it in session storage.
  • Since the header isn't sticky and user will not know when cart is updated, I defaulted to having a toast notification with different messages when you add a new item and when you add an already selected item.
  • A possible improvement will be to add client-side pagination.
  • I used the Vue-Webpack proxy workaround to proxy and bypass the CORS errors on dev and netlify redirect to bypass it on the live version.
  • I defaulted to having the loader show up when there is an error as opposed to showing a blank screen or just text.

About


Languages

Language:Vue 38.4%Language:TypeScript 32.6%Language:SCSS 21.1%Language:JavaScript 6.5%Language:HTML 1.2%Language:Shell 0.1%