2

I upgraded a npm and now my webpack fails around this line here.

const { theme } = params;

What does this mean when you have { } around the variable name?

jremi
  • 2,879
  • 3
  • 26
  • 33

1 Answers1

3

This is called destructuring assignment. The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.

Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317