@lipe11
Posted
hi, your solution looks pretty good!... I used svelte in mine as well.
Overall looks good in my opinion, I'll just leave a couple of suggestions.
I think the lib folder could be a little bit misleading (they're mostly used for organizing modules), instead, I think you can omit it, and leave your components like this
src/components
src/components/cart
src/components/icons
src/stores
Another good recommendation to follow I think it's to avoid modifying stores directly, instead, have "action" functions that you can reuse in your components, something like this
const isVisible = writable(false)
function show() {
isVisible.set(true)
}
function hide() {
isVisible.set(false)
}
export default { isVisible, show, hide }
Hope this is useful