• Stars
    star
    3,893
  • Rank 11,255 (Top 0.3 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸš€ Blazing fast page load and seamless navigation.

React Server is now defunct

Consider Next.js instead.

React Server

Build Status NPM version NPM downloads per month Chat on Slack NPM license Powered by Redfin

React framework with server render for blazing fast page load and seamless transitions between pages in the browser.


Just getting started with react-server?

The easiest way to get started is with our yeoman generator:

# install yeoman
npm install -g yo

# install the react-server generator
npm install -g generator-react-server

# make a new react-server project in the CURRENT directory
yo react-server

# run the new app
npm run start
# go to http://localhost:3000

That hooks you up with react-server-cli, which will take care of the server part and get you up and running right away.

Why react-server?

One of the great things about React is its support for server-side rendering, which can make sites show up faster for users and play better with search engine bots.

However, when you actually try to use React for server-side rendering, you quickly run into a bunch of practical problems, such as:

  • How should I load data on the server for my components?
  • How do I ensure that the client and the server load the same data and generate the same HTML markup?
  • How do I write code that can be both generated server-side and be part of a single-page application (SPA)?
  • How should I optimize the delivery of my JavaScript and CSS?
  • How do I find out about and follow performance best practices?
  • How do I ensure that my site is streamed to the browser as quickly as humanly possible?
  • How can I make my app resilient when my backend has high latency spikes?

react-server is a framework designed to make universal (nΓ©e isomorphic) React easier to write, providing standard answers for these questions and more. When you write your app for react-server, you concentrate on your React components, and react-server takes care of everything else that's needed to run and deploy real React server-rendered apps. Under the hood, react-server is doing a bunch of clever optimizations, many borrowed from the ideas behind Facebook's Big Pipe, to make sure that your site shows up as quickly as humanly possible for your users.

Once you're hungry for more, dig into the React Server documentation and the react-server code.


Migrating from react-server 0.8.1 to 1.0.0

This release is a major, potentially breaking, change which upgrades react-server's dependencies from webpack 1.x to webpack 4.x, and babel 6.x to babel 7.x.

If using default react-server configuration, you should be able to update to 1.0.0 without issue. However, if you have extended the default react-server webpack config using the webpackConfig option, you may need to update your webpack configuration options to match Webpack 4.x Documentation.

Note: If you are having trouble loading css bundles in mode = production, try switching from import to require() syntax. webpack-contrib/mini-css-extract-plugin#27

Want to help?

Great! There's a lot to do! See the contributing guide to get started.

Where's all the code?!

This is a Lerna respository with multiple npm packages! Check out the packages/ directory πŸ‘€.

More Repositories

1

npm-bazel

Bazel build rules and workspace generators for building node modules
Python
30
star
2

fuzzy

A handy little library for writing expressive "fuzz tests" in Java
Java
24
star
3

dirpy

Server-side image cropping and scaling
Python
21
star
4

mobbage

A HTTP stress test & benchmarking tool
Python
21
star
5

bazel-generator-plugin

Java
13
star
6

request-local-storage

πŸŽ€ Simple access to objects tied to requests
JavaScript
9
star
7

stratocacher

🎸 A cache with pluggable layers.
JavaScript
6
star
8

babel-vs-v8-perf-test

Perf testing for Babel vs V8
JavaScript
5
star
9

validity

A Java framework for fluent argument and state validation.
Java
5
star
10

patience

A simple, fluent, highly customizable Java library for waiting for expected conditions.
Java
5
star
11

WalkScoreApi

Example use of Walk Score APIs in Node.js
JavaScript
4
star
12

swift-style-guide

Redfin Swift Style Guide
2
star
13

slides

Redfin's talk slides, as a static github page
JavaScript
1
star
14

insist

A customization of the Validity framework for use as a Java unit test assertion and assumption library.
Java
1
star
15

IconsExperiment

JavaScript
1
star
16

contractual

Contractual is a set of Java interfaces that define generic test contracts. A JUnit 5 test class can then implement one or more of these test interfaces to inherit test cases that verify that their contract is fulfilled by the class under test.
Java
1
star
17

patient-selenium

A customizable, fluent wrapper for Selenium WebDriver. By default it includes the ability to set a default wait behavior for locating elements that isn't stored as a global state (unlike implicit timeouts). It also allows for re-finding elements when they throw a StaleElementReferenceException.
Java
1
star