This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { render } from 'react-dom'; | |
| render( | |
| <div> | |
| <button> | |
| Hello World! | |
| </button> | |
| </div> | |
| , | |
| document.getElementById('app'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var path = require('path'); | |
| module.exports = { | |
| entry: ['./main.jsx'], | |
| output: { | |
| path: path.join(__dirname, 'wwwroot'), | |
| filename: '[name].bundle.js', | |
| }, | |
| watch: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "devDependencies": { | |
| "babel": "^6.5.2", | |
| "babel-loader": "^6.2.4", | |
| "babel-polyfill": "^6.7.4", | |
| "babel-preset-es2015": "^6.6.0", | |
| "babel-preset-react": "^6.5.0", | |
| "babel-preset-stage-0": "^6.5.0", | |
| "file-loader": "^0.8.5", | |
| }, | |
| "dependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| <script src="~/main.bundle.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.AspNet.Mvc; | |
| namespace SampleApp.Controllers | |
| { | |
| public class HomeController : Controller | |
| { | |
| public IActionResult Index() | |
| { | |
| return View(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddMvc(); | |
| } | |
| public void Configure(IApplicationBuilder app) | |
| { | |
| app.UseIISPlatformHandler(); | |
| app.UseStaticFiles(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "dependencies": { | |
| "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", | |
| "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", | |
| "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", | |
| "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dnu restore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install -g yo grunt-cli generator-aspnet bower | |
| yo aspnet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { render } from 'react-dom'; | |
| import { Router, Route, Link, browserHistory, IndexRoute } from 'react-router' | |
| class LangList extends React.Component { | |
| render() { | |
| return ( | |
| <div>LangList</div> | |
| ) | |
| } | |
| } |
NewerOlder