DEV Community

ASP.NET Core 2 React.js Template with ES6 (not TypeScript)

Sung M. Kim on April 03, 2018

I created a Nuget package for dotnet new template. Why? I don't know why but dotnet CLI has SPA templates for ASP.NET Core 2 React.js...
Collapse
 
chiangs profile image
Stephen Chiang

Cool, I love working with TypeScript in Angular. But I'm also not going to go out of my way to add it.

I'll give this a try as I need to do this exact stack for an upcoming project. Thanks for making this.

Collapse
 
dance2die profile image
Sung M. Kim

You're welcome Stephen.

But I haven't been able to keep it up to date 😅 and the project's in a graveyard... 🧟‍♂️

Collapse
 
chiangs profile image
Stephen Chiang • Edited

Oh that's too bad haha, what's out of date about it?

Thread Thread
 
dance2die profile image
Sung M. Kim

I haven't updated React & .NET Core versions and they are out of date 😢

Thread Thread
 
chiangs profile image
Stephen Chiang • Edited

Ah but that's not too hard to do for the user after initial setup 😉

Edit
Actually...based on what I can tell from installing the latest version of the reactredux template from .net Core...there's no TypeScript to be found...although it does include jQuery and Bootstrap, which is annoying.

Collapse
 
simpert profile image
Tommy

I believe you may have some mis-information. As a long time user of babel and a early typescript supporter it is my experience that configuring ts is much much less difficult and less a pain then babel. Now with every single editor I am familiar with shipping with first class ts support just a 5 line tsconfig.json file is enough for a common config. tsc -p tsconfig.json. JavaScript is a extremely messy world of code compared to other languages and in my experience ts helps with this. Having a type system ensures possibility of a bug-riddled code base is massively reduced right from first debug session since it helps to author more scalable and clear code as you type it since we developers are all human and tend to make simple mistakes often. Babel has been dead to me the past few years since adopting ts.

Collapse
 
dance2die profile image
Sung M. Kim • Edited

Thank you, Tommy for sharing your experience.

I can see the benefit of TypeScript and only recently started seeing the benefit that comes with it.

From what I've read, TypeScript is a superset of JavaScript so I thought I could've simply wrote React components the same way you do with vanilla JavaScript but didn't go well, mostly because I was too lazy 😓 to learn at the time.

I decided to learn TypeScript to use for React ever since I found this sw-yx/react-typescript-cheatsheet & a nice curated TypeScript learning site 👇

From your GitHub page, it seems like you have a .NET background, as well. I'd love to read/see if you would share what you've learned & learning 🤜.

Collapse
 
codingblocks profile image
CodingBlocks.net

Wait...ASP...and command line? We live in strange and interesting times!

Collapse
 
dance2die profile image
Sung M. Kim

... and interesting times!

Interesting in a good way 😀

I was shocked to find out dotnet new can create a project from a template.