Reputation: 14179
This is perfectly fine for Babel/Webpack
import React from 'react';
but in Typescript needs to be:
import * as React from 'react';
what's the reason?
Upvotes: 0
Views: 115
Reputation: 7294
Add allowSyntheticDefaultImports
to your tsconfig.json
to allow default imports from modules with no default export.
Upvotes: 3