Skip to content

Create React apps with server-side rendering and no build configuration. NOTE: This is an EARLY PREVIEW!

License

Notifications You must be signed in to change notification settings

joshhbk/react-app

 
 

Repository files navigation

React App SDK  

Server-side rendering with React.js
How fast is React SSR?

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:

Directory Layout

.
├── /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

package.json

{
  "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.

npm start

For more information refer to Create React App documentation:

Join our Telegram chat for support and feature requests - https://t.me/reactapp

Contribute

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!

License

MIT © 2016-present Facebook, Kriasoft

About

Create React apps with server-side rendering and no build configuration. NOTE: This is an EARLY PREVIEW!

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.6%
  • Shell 1.2%
  • Other 0.2%