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,693
  • 3
  • 24
  • 32

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
  • 113,563
  • 27
  • 250
  • 306