What is the difference between
import React, { Component } from 'react';
and
import { default as React, Component, } from "react"
I found it [here] (https://tomchentw.github.io/react-google-maps/basics/simple-map) in react-google-maps demo.
What is the difference between
import React, { Component } from 'react';
and
import { default as React, Component, } from "react"
I found it [here] (https://tomchentw.github.io/react-google-maps/basics/simple-map) in react-google-maps demo.
Nevermind) already found the answer :
The default export is actually just a named export with the special name default. That is, the following two statements are equivalent:
import { default as foo } from 'lib';
import foo from 'lib';