Code, write, talk, and doodle about JavaScript & stuff. 🐱-as-a-Service: HTTP Status Cats, RasPi KittyCam, Git Purr 💻 I have more (older) writings about the web on girliemac.com.
Yes, I've found it super useful too! Especially when I am trying to grab data from some API that returns a request with a JSON. Destructuring comes really handy to assign the data to variables and I love that!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Also similar to spread is the rest operator - you can team it up destructuring to get properties out of objects:
This is great for React props which need to be passed to child components.
And then to shallow copy an object:
Also great in React for setting state or in a Redux reducer.
Yes, I've found it super useful too! Especially when I am trying to grab data from some API that returns a request with a JSON. Destructuring comes really handy to assign the data to variables and I love that!