2

My group decided that we would like to try to use React.js in our final assignment. After searching online for the last two days I have been unable to find a working example of someone using React.js in an ASP web application without using MVC. The reason for our hesitation in using MVC is that we haven't learned anything about it in class other than a day lecture and we don't have time to learn to use MVC and React.js for this assignment.

All we'd like to know is simply how to use React.js in an ASP web application. Do we need to make a JSX file and reference it in an HTML page? Do we do the React.js code in the HTML page itself?

2
  • 1
    React is just a Javascript library for UI, it doesn't require any particular stack to work, so you do not have to use the MVC pattern with it. Commented Dec 10, 2015 at 19:54
  • How do I use it in ASP then? If I have a .JSX file with the React.js code, how do I reference it in an ASP web page? Some examples I've read are using a reference like <script src="@Url.Content(~/Script/jsx.jsx)"> but that doesn't work either Commented Dec 10, 2015 at 20:58

1 Answer 1

3

As you asked, here is an example using ASP 5 with react and the associated article

I suggest taking a chance on ASP.net mvc. Download the free version of visual studio, start the template and step through the code. You will pick it up rather quickly. It works nicely with React and is the View in MVC. I would be more concerned learning React in a short period of time then asp.net MVC.

Once you have ASP.net mvc in place look up React.Net and install it using nuget. This will help you integrate the 2 frameworks easily.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.