microsoft / TypeScript-React-Native-Starter

A starter template for TypeScript and React Native with a detailed README describing how to use the two together.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use of allowSyntheticDefaultImports flag in tsconfig.json

YagoLopez opened this issue · comments

Reading README.md it says:

Moving files over to TypeScript

[...]

We'll immediately get a few errors, but they're easy enough to fix. The changes will include:

Replace import React, {Component} from 'react'; with import * as React from 'react';

I am using React+Typescript, and activating the flag allowSyntheticDefaultsImports in tsconfig.json solves this issue. Now you can use import React, {Component} from 'react' without modificate the code.

I was wondering if it is worth I send a pull request to modify README.md. Thanks