3 Replies
vsc is throwing an error if I use the spread operator within a json object
can't seem to find out the reason why we can't use spread operators in a json object, what's the reasoning behind why it doesn't work
when would be fine, so I am wondering why is it that spread operators can't be used within JSON objects
They can
I know it's a common pattern in React, I'm not an expert but try
the output of that is
{ '0': 'nameOne', '1': 'nameTwo' }
which isn't the same as
didn't know we could do that though, that's good to know
that works
got that idea from your help, awesome!
thank you @vince