Giter VIP home page Giter VIP logo

Comments (5)

casoetan avatar casoetan commented on August 25, 2024 1

@Stanko works great now.

Best,

from react-plx.

casoetan avatar casoetan commented on August 25, 2024 1

from react-plx.

Stanko avatar Stanko commented on August 25, 2024

Hello @casoetan,
Quick fix would be to inject environment variable SERVER_RENDER into process.env.SERVER_RENDER using https://webpack.js.org/plugins/define-plugin/, and then don't render this component if it is true.

But I will add a prop in the version which will be called serverRender or moveWindowStuffToComponentDidMount 🙂 which will move adding window event listeners to componentDidMount. Atm these are created in the constructor and componentWillMount.

EDIT: instead of prop, I'll try to detect node env and let component do that on it's own.

Cheers!

from react-plx.

Stanko avatar Stanko commented on August 25, 2024

@casoetan I just released version with the fix for universal rendering. Could you please try with this version and close the issue if it is resolved.

commit: 31d15ca

from react-plx.

Stanko avatar Stanko commented on August 25, 2024

Glad it helped!

P.S. If you can share, I would really like to see where are you using Plx :)

from react-plx.

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.