Giter Site home page Giter Site logo

Comments (2)

gre avatar gre commented on April 28, 2024

I'm OK to remove the freeze.
Can you provide a PR ?

Thanks
Le 26 janv. 2016 00:42, "Uldéric KIBONGUI" [email protected] a
écrit :

Hi, first thanks you for your awesome project [image: 👍]

I've been experimenting with gl-react and electron-react-boilerplate (
https://github.com/chentsulin/electron-react-boilerplate).
See this little example:
https://github.com/morukutsu/electron-react-boilerplate/blob/master/app/containers/App.js

Running this code will produce an exception in events.js (Node.js related
file, I think) in the addListener function line 220:

++this._eventsCount;
Uncaught TypeError: Cannot assign to read only property '_eventsCount' of #

The bug is caused by
https://github.com/ProjectSeptemberInc/gl-react/blob/master/src/Shaders.js#L182
which exports an immutable Shaders object.
Then, here
https://github.com/ProjectSeptemberInc/gl-react-dom/blob/master/src/compileShaders.js#L17
, an event is added to this object.

To quick fix it, I just removed the call to Object.freeze and it worked
very well.

I don't know what the Javascript RFC says about adding an event to a
frozen Object but I guess it violates the immutability assertion. Also, why
does the errors happens in this environment, I did not test it in the
browser yet. What do you think?

Thanks


Reply to this email directly or view it on GitHub
https://github.com/ProjectSeptemberInc/gl-react/issues/48.

from gl-react.

morukutsu avatar morukutsu commented on April 28, 2024

Okay, yes no problem, I'll submit it.

from gl-react.

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.