What is the difference between:
A
and
B
B is using a default import. You can you any name you want to replace 'something'. However, there must be a 'default' export in the package.
A is a named import. This works if there is an export with the name 'something' in the package.
A
import { something } from "somethingPackage"
and
B
import something from "somethingPackage"
B is using a default import. You can you any name you want to replace 'something'. However, there must be a 'default' export in the package.
A is a named import. This works if there is an export with the name 'something' in the package.
No comments:
Post a Comment