To start out, I created a React JS project in Visual Studio 2017 to start exploring. There are two options – React JS and React JS w/Redux.
My first question is what the heck is Redux? 2-3 articles later (reference #1 gives a lot of good insight), it seems like Redux adds architecture behind React JS. It is not required, but if your React JS application grows to any size, more people seemed to have a positive opinion about using Redux than negative. So, I threw it into the sample project and started poking around.
- After building and running the app, I get this error:
System.TimeoutException: The create-react-app server did not start listening for requests within the timeout period of 50 seconds
Reference #2 shows that it happens on launch and refreshing the browser loads the app (this happened for me as well). Their recommended of adding additional time to Startup.cs -> Configure(args) also worked for me.
spa.Options.StartupTimeout = new System.TimeSpan(0, 0, 80);
- Upon running the VS 2017 sample, it looks exactly like the Angular 5 Type Script sample
- For this to live with the Angular 5 Type Script client, we cannot have any conflicts with the package.json since their dependencies are completely different. I don’t know how this will play out when I try to combine them, but the client is contained in ‘/ClientApp’ like the Angular 5 client. Assuming there is not conflict renaming one of them, the React JS lives in the /ClientApp folder. So combining them should not be a problem.
- The React JS/Redux package uses .NET Core 2.1 which will not play nicely with the intermediate Angular 5 client I got working yesterday 😦 On the positive side, the Angular 6 template places the package.json inside its /ClientApp. I am assuming this is because others have required client isolation from other part of their .NET Core application. On the negative side, I am going to have to upgrade to Angular 6 BEFORE being able to see if I can combine it with React JS/Redux.