3

Being new to both ReactJS and ASP.NET MVC, I am having trouble using the import key word for including my anyComponent.jsx files.

I have only figured out two options:

  1. Use a script tag on the index.cshtml page
  2. Leave all components in one file

In my other projects, I have used Webpack and Babel but understand very little of how they work so I assume that ASP.NET MVC has it's own bundling that I understand even less.

The Nuget packages installed are:

  • React.Core
  • React.Web
  • React.Web.Mvc4

Can someone point me in the right direction please?

sufuninja
  • 87
  • 2
  • 8

1 Answers1

3

ReactJS.NET doesn't support JavaScript modules. You'll need to use a browser build (eg. via Webpack or Browserify).

srdjanRakic
  • 138
  • 1
  • 1
  • 8