@vin_coder/pg-cli-template-project-react
Advanced tools
| import React, { Component } from "react"; | ||
| class Home extends Component { | ||
| render() { | ||
| return <div>Home Page</div>; | ||
| } | ||
| } | ||
| export default Home; |
| import React from "react"; | ||
| import { Switch, Route } from "react-router-dom"; | ||
| import Home from "./home"; | ||
| const Routes = ({ location }) => ( | ||
| <Switch location={location}> | ||
| <Route exact path="/account" component={Home} /> | ||
| </Switch> | ||
| ); | ||
| export default Routes; |
| h1 { | ||
| font-size: 16px; | ||
| } |
+2
-2
| { | ||
| "name": "@vin_coder/pg-cli-template-project-react", | ||
| "version": "0.0.40", | ||
| "version": "0.0.41", | ||
| "description": "react 项目模板文件", | ||
@@ -28,3 +28,3 @@ "main": "index.js", | ||
| "homepage": "https://github.com/vin1992/pg-cli#readme", | ||
| "gitHead": "8cb9412e8aa367d3862eb146a3becfea6de1ff66" | ||
| "gitHead": "39a8f388c9c87ac225f7cc3d910af972d3c52f14" | ||
| } |
| import React, { Component } from "react"; | ||
| class Home extends Component { | ||
| render() { | ||
| return <div>Home Page</div>; | ||
| } | ||
| } | ||
| export default Home; |
| import React from "react"; | ||
| import { Switch, Route } from "react-router-dom"; | ||
| import Home from "./home"; | ||
| const Routes = ({ location }) => ( | ||
| <Switch location={location}> | ||
| <Route exact path="/account" component={Home} /> | ||
| </Switch> | ||
| ); | ||
| export default Routes; |
| h1 { | ||
| font-size: 16px; | ||
| } |