Giter VIP home page Giter VIP logo

Comments (3)

DylanPiercey avatar DylanPiercey commented on August 16, 2024

I don't currently have time do attempt this but another option would be to try https://github.com/Olical/react-faux-dom.

from react-chartist.

fraserxu avatar fraserxu commented on August 16, 2024

Hi @DylanPiercey Thanks for the suggestion here, Sorry I'm a little busy at work recently and don't have time to look at this.

I'll take some time to look into this probably this weekend.

from react-chartist.

crobinson42 avatar crobinson42 commented on August 16, 2024

@DylanPiercey Have you had a chance to demo SSR w/ react-chartist?

I just did a quick test with the example code from the repo and the response is:

<div><div class="ct-chart ct-octave"></div></div>

with this code:

var Pie = require('./Server/Chart');

      var ComponentFactory = React.createFactory(Pie);
      var html = ReactDOMServer.renderToStaticMarkup( ComponentFactory() );

This is because the first revolution of the DOM render is still processing.. this is due to the logic being used in componentDidMount, which waits for the DOM to mount before it applies the chart. In the server-side environment, react doesn't go past the first render cycle and immediately returns the first rendered output.

So, the answer to this is No. You cannot achieve server side render, with the current npm package.

from react-chartist.

Related Issues (20)

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.