Looking through older tutorials or code for blocks built in 2018/2019 vs the more current blocks, I see two different ways attribute values are set.
For example, the “old” way for an attribute called “content” might be:
onChange={ (newContent) => setAttributes({ content: newContent })}
Whereas in a more modern block:
onChange={ ( content ) => setAttributes( { content } )}
I get it’s a minor change but I’m curious if anyone here knows why.
Thanks!