0

In one of the tutorials on ReactJS I just happened to see the following code.

import React from 'react';
import {createStore} from 'redux';

Question 1: So what's the point of {}, I'm sure something must be really interesting and meaningful.

Question 2: I come from Python background, so trying to see how similar/different the importing in ES6 is different from Pythonic way (we don't have {} types in python .

Mayank Shukla
  • 100,735
  • 18
  • 158
  • 142
rrmerugu
  • 1,826
  • 2
  • 20
  • 26

1 Answers1

-1

In this case, {} is a destructuring assignment. It has to do how redux exports createStore function.

comparing it to python it would be from redux import createStore vs import react

Sasha Ko
  • 112
  • 7