this is a lot more readable: const {a: b, a: {b: a}} = o
-
-
- Kraj razgovora
Novi razgovor -
-
-
Thought you didn't want to use const anymore????

-
I was just thinking about it. No need to be hasty :P
- Još 1 odgovor
Novi razgovor -
-
-
Not completely

- Još 1 odgovor
Novi razgovor -
-
I'm not a fan of this nested destructuring thing Kent. Leads to criptic code, especially for beginners.
-
Realistically in a business setting this code takes two lines : one line for the destructuring and one comment written by the junior dev to help future junior devs understand it
- Još 3 druga odgovora
Novi razgovor -
-
-
Now the question becomes, should you do that kind of destructuring? Would doing that on two different lines be more readable? const { target } = event; const { value, name } = target; V.S. const { target, target: { value, name } } = event;
-
2 lines is 100% more readable imo. Especially as you add additional variables.
- Još 1 odgovor
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
