GithubHelp home page GithubHelp logo

microsoft / typescript-react-conversion-guide Goto Github PK

View Code? Open in Web Editor NEW
1.4K 40.0 203.0 491 KB

A guide for converting a simple JavaScript/React project to TypeScript. Contains both before an after code with the step-by-step process in the README below.

License: MIT License

CSS 19.06% HTML 4.33% JavaScript 38.31% TypeScript 38.30%

typescript-react-conversion-guide's Issues

README.md

Opening is spelled wrong in the last line of README.md

Build error

Error when running npx build after configuring ts, editing build pipeline:

ERROR in ./src/app.jsx
Module build failed: Error: It looks like you're using an old webpack version without hooks support. If you're using awesome-script-loader with React storybooks consider upgrading @storybook/react to at least version 4.0.0-alpha.3
at Object.ensureInstance (/home/code123/Documents/js/TypeScript-React-Conversion-Guide/TicTacToe_JS/node_modules/awesome-typescript-loader/src/instance.ts:142:9)
at compiler (/home/code123/Documents/js/TypeScript-React-Conversion-Guide/TicTacToe_JS/node_modules/awesome-typescript-loader/src/index.ts:45:19)
at Object.loader (/home/code123/Documents/js/TypeScript-React-Conversion-Guide/TicTacToe_JS/node_modules/awesome-typescript-loader/src/index.ts:14:12)

React 16

Is there any way to get typescript to show the correct line numbers in React 16? It seems like right now it is showing the error numbers from the JS and not the TSX?

Specifically ts-jest is the project having this issue.

README.md correction

Line 103 of README.md needs to be corrected to have dist removed, i.e. change from:
filename: './dist/bundle.js'
to be:
filename: './bundle.js'

This will now accurately match the intention, i.e. of having a copy-and-paste into README of TicTacToe_TS/webpack.config.js for sensible build design.

Would be cool if you opened up access permissions on this repo to allow anyone to push a branch with a proposed fix, as then I'd have done so myself ๐Ÿ˜„ .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.