Giter VIP home page Giter VIP logo

Comments (7)

gaearon avatar gaearon commented on May 1, 2024

Please provide a reproducible example. Babel plugin doesn't add any HOCs.

from babel-plugin-react-transform.

jonathanglasmeyer avatar jonathanglasmeyer commented on May 1, 2024

Ok, i investigated some more.
The problem is the following:
We use fluxible, which provides the provideContext helper, which wraps your root component by returning a HOC that injects context into its its wrapped component. it copies over statics by using hoist-non-react-statics, which in turn uses var keys = Object.getOwnPropertyNames(sourceComponent) to get the relevant statics (see source). When console.logging those keys without using this plugin, this returns an array that contains "willTransitionTo". When using with this plugin, the array doesn't contain "willTransitionTo" (just ["length", "name", "arguments", "caller", "prototype", "displayName", "__reactPatchProxy", "contextTypes"]).

I am not sure if this is expected behaviour, as I do not entirely understand the limitations section of your react-proxy README:

Does not replace ES7 instance properties
Does not replace bound static methods
Replacing a method using autobind-decorator causes its identity to change

(I don't find google results for "ES7 instance properties" and "bound static methods" -- excuse my ignorance :))

from babel-plugin-react-transform.

gaearon avatar gaearon commented on May 1, 2024

Closing as duplicate of gaearon/react-proxy#23.

from babel-plugin-react-transform.

jonathanglasmeyer avatar jonathanglasmeyer commented on May 1, 2024

Ok thanks for confirming, will watch there!

from babel-plugin-react-transform.

gaearon avatar gaearon commented on May 1, 2024

Just to clarify—this is not related to limitations in README, those are only talking about what's hot reloaded. The problem is a side effect of the way static properties are currently being proxied.

from babel-plugin-react-transform.

gaearon avatar gaearon commented on May 1, 2024

Thank you for reporting this.
It should be fixed in [email protected] via [email protected] (gaearon/react-proxy#29).
Please verify.

from babel-plugin-react-transform.

jonathanglasmeyer avatar jonathanglasmeyer commented on May 1, 2024

Awesome. Works! Thank you so much. :) deploying react-transform to all of
our projects now. Yey :)

Dan Abramov [email protected] schrieb am Fr., 25. Sep. 2015 22:17:

Thank you for reporting this.
It should be fixed in [email protected] via [email protected] (
gaearon/react-proxy#29 gaearon/react-proxy#29).
Please verify.


Reply to this email directly or view it on GitHub
#25 (comment)
.

from babel-plugin-react-transform.

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.