Skip to content
New issue

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

Incorrect export from react-addons-create-fragment package #9381

Closed
lscspirit opened this issue Apr 8, 2017 · 1 comment
Closed

Incorrect export from react-addons-create-fragment package #9381

lscspirit opened this issue Apr 8, 2017 · 1 comment

Comments

@lscspirit
Copy link

The react-addons-create-fragment npm package (v15.5.2) is not exporting the createReactFragment() function as intended. Instead it is exporting a function that returns the createReactFragment().

To reproduce:

var createFragment = require('react-addons-create-fragment');
var Hello = React.createClass({
  var fragment = createFragment({
    hello: <span>Hello</span>,
    world: <span>World</span>
  };
  render: function() {
    return <div>{ fragment }</div>;
  }
});

ReactDOM.render(
  <Hello/>,
  document.getElementById('container')
);

// Actual render: <div></div>
// Expected render: <div><span>Hello</span><span>World</span></div>

Note that the React.addons.createFragment that comes with react-with-addons.js is working as expected. This bug only affects the npm package.

@gaearon
Copy link
Collaborator

gaearon commented Apr 9, 2017

Should be fixed in react-addons-create-fragment@15.5.3.
Thanks!

@gaearon gaearon closed this as completed Apr 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants