We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, it's me again :D
You know I'm working on a st-js bridge for React. I'm stuck on the part where I call React.createClass() automatically in stjs.extend() (see https://github.com/onigoetz/react-bridge/blob/master/src/main/js/react/stjs-react.js )
React.createClass()
stjs.extend()
You see in this method, that we completely bypass the stjs.extend() method in favor of React.createClass()
The problem is that the return we do at the end is not taken into account because how the STJS code is generated:
return
The generated STJS code is:
var Panel = function() {}; stjs.extend(Panel, null, [], function(constructor, prototype) { prototype.render = function() { return "content"; }; }, {}, {_: {"IsReactClass": {}}});
But should actually be:
var Panel = stjs.extend(function() {}, null, [], function(constructor, prototype) { prototype.render = function() { return "content"; }; }, {}, {_: {"IsReactClass": {}}});
Even when I do _constructor.prototype = React.createClass({}).prototype; the constructor is still the original one which is not what we want...
_constructor.prototype = React.createClass({}).prototype;
If you accept this change of generation, I can make a pull Request with the fix.
The text was updated successfully, but these errors were encountered:
Oops this should have been closed a long time ago, released in 3.1.5
Sorry, something went wrong.
No branches or pull requests
Hi, it's me again :D
You know I'm working on a st-js bridge for React. I'm stuck on the part where I call
React.createClass()
automatically instjs.extend()
(see https://github.com/onigoetz/react-bridge/blob/master/src/main/js/react/stjs-react.js )You see in this method, that we completely bypass the
stjs.extend()
method in favor ofReact.createClass()
The problem is that the
return
we do at the end is not taken into account because how the STJS code is generated:The generated STJS code is:
But should actually be:
Even when I do
_constructor.prototype = React.createClass({}).prototype;
the constructor is still the original one which is not what we want...If you accept this change of generation, I can make a pull Request with the fix.
The text was updated successfully, but these errors were encountered: