Create React apps with server-side rendering (SSR) and no build configuration. It's intended to be
used as a drop-in replacement for create-react-app
.
All you have to do is to replace react-scripts
dependency in your project (package.json
) with
react-app-tools
plus provide one more entry point for the server-side application bundle as
demonstrated below:
.
├── /build/ # The compiled output
├── /src/ # Application source files
│ ├── /components/ # React.js components
│ │ ├── /App/ # - The top-level React component
│ │ ├── /Button/ # - Some other UI element
│ │ └── /... # - etc.
│ ├── /app.node.js # Server-side rendering, e.g. ReactDOM.renderToString(<App />)
│ ├── /app.browser.js # Client-side rendering, e.g. ReactDOM.render(<App />, container)
│ └── /server.js # Server-side entiry point, e.g. app.listen(8080)
└── package.json # List of project dependencies
{
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0"
- "react-scripts": "^1.0.17"
+ "react-app-tools": "^2.0.0-beta.1"
},
"scripts": {
"test": "react-scripts test --env=jsdom",
"build": "react-scripts build",
"start": "react-scripts start"
}
}
You can launch the app in development mode by running:
$ npm install
$ npm start
Then open http://localhost:3000/ to see your app.
When you’re ready to deploy to production, create a minified bundle with npm run build
.
For more information refer to Create React App documentation:
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.
Join our Telegram chat for support and feature requests - https://t.me/reactapp
Help shape the future of React App SDK by joining our community today, check out the open issues, submit new feature ideas and bug reports, send us pull requests!
MIT © 2016-present Facebook, Kriasoft