Code Monkey home page Code Monkey logo

fast-react-render's Introduction

With the release of the new version React and Node.js the performance issue has ceased to be so acute. Use last versions of React and Node.js for better performance.

[React] Server render Build Status Coverage Status

The module for rendering react-element in the server 3 times as fast (see benchmarks) as traditional react rendering (in production mode).

Quick start

All you need to use it, is only:

  1. install package
npm install fast-react-render
  1. replace you render to:
var ReactRender = require('fast-react-render');

var element = React.createElement(Component, {property: 'value'});
console.log(ReactRender.elementToString(element, {context: {}}));

Cache

React server rendering support cache for component.

First of all, you must choose cache system. It can be any system, which implement ICache interface (interface). For caching, component must implement ICacheableComponent interface (interface).

Example with using LRU cache: render with LRU cache (install lru-cache package first).

What's next

If you need more performance, you can try use fast-react-server - is high speed mock for react, which provide rendering 11 times as fast as traditional, but require more configuration for build system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.