4 ms·
Nice! Thank you
by foreigner 8y ago
Nice! Thank you
- anonytrary 8y agoCompletely tangential, but you can also do the opposite with nesting, which I learned about literally yesterday: const { some: { nested: { field } } } = tree; // field === tree.some.nested.field or rename things while you destructure them: const { crappyFieldName: betterName } = myObject; // betterName === myObject.crappyFieldName Now I can't stop using this feature...