22 Replies
what does
data.js
look like ?for the CoreConcepts object it's
hum, you've found yourself in one of the very few instances where
v-bind:
can be usefull...hahaha
I was only aware of :id :class to be honest, I didn't think v-bind was used outside of that
tho, for readability I would advise you to do something like :
that way it's both easier to see what is in
CORE_CONCEPTS
and you don't risk having weird error when you add something else in your data.js
or rename something
(and you should avoid using id=
in components unless you need some outside code to access it, it will cause problems if you get to reuse your component)ah sure, that makes sense, similar visual to
yeah
well... yes and no
yes in the sense that both use destructuring
no in the sens that one is the component's usageand the other is the component's definition
yeah meant the destructuring
I'm a wee bit confused on this part.. how is variantImage working with variant.image?
ah.. because you set image to the value of variantImage, ignore me.
and then you use it here
because it's using the parameter
yeah, it's just a function call
no magic happening here
ya
how odd, first time I've encountered something forcing me to use ' ' and not " " (naturally find " " easier)
it's a personal taste, but I like using simple quotes
''
in JS/TS and double quotes ""
with HTML for this exact reason'cause the whole code is encoded in it
lmao
I couldn't figure out how to turn add vue to codepen
just... use the provided template...
avoid using
disabled
on buttons, it's bad for a11y (it's as if you had display: none
on it) use aria-disabled="true"
instead. other than that it's nice
could use a bit of // #region
in the script to group up the related stuff, but overall it's good
(you might also wantto replace that v-on:click
by @click
Forgot about the aria-disabled!
I'm stumped on this part, and google sucked at helping..
whilst that's true, I need a message to appear showing "brand + product is on sale" which I think is something such as....
with
However... how do I get it to check whether onSale is true or false lol
what do you mean ?
oh hold on I think I'm just being dumb
might be that
my computed property isn't checking the value of onSale, but my v-if is, I guess
That's enough of that for 1 night, that was very refreshing though!