How to make this simple TypeScript + React app wor

2019-07-15 04:26发布

After looking around for examples of TypeScript + React apps using the Visual Studio 2015 tool chain, I decided to try and make a simple example project myself, ready to check out from github, build and run.

However, after spending several hours trying to make this work, I don't seem to get it going. Here is the public repository: https://bitbucket.org/KoenT_IM/typescriptreacttests.git

Could someone show me how to make this project build and run using Visual Studio 2015? Thanks!

Note: I'm only interested in a setup for a web client app (front-end). The server for our actual project is built in C#/.NET (separate project). Communication between the two will be done using websockets.

1条回答
你好瞎i
2楼-- · 2019-07-15 05:00

OK, after some more testing and trying, I got a basic example working.

It's using the currently latest stable version of React (0.14.6, so where react and react-dom are split off), the AMD module loading system (using require.js), and VisualStudio 2015 CE, where you can debug in the IDE (when using Internet Explorer). I started from the "HTML Application with TypeScript" project template in Visual Studio. It's still in the repository on GitHub I posted earlier: https://bitbucket.org/KoenT_IM/typescriptreacttests

查看更多
登录 后发表回答