Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| import { fromPairs, map, pick } from "ramda"; | |
| /** | |
| * Wraps a React component into Angular component. Returns a new Angular component. | |
| * | |
| * Usage: angular.module('some.module').component('newAngularComponent', react2angular(MyReactComponent)) | |
| * (the usage is the same as in similar lib https://github.com/coatue-oss/react2angular) | |
| */ |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000This is a small example to build a simple routing solution for React.js instead of using the popular React Router.
It utilizes great libraries e.g. history and universal-router which are React-independent.
The example includes:
history object for URL navigationRouter component to route different child componentsLink component that acts as those in React Router or in React Static BoilerplateApp to demostrate their usages