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

Do not rely anymore on createFragment #175

Merged
merged 20 commits into from
Mar 18, 2018
Merged

Do not rely anymore on createFragment #175

merged 20 commits into from
Mar 18, 2018

Conversation

MonsieurV
Copy link
Collaborator

The package react-addons-create-fragment is deprecated and should not be used anymore.

The recommended approach is to use an array and key fragment elements (See facebook/react#9207).
Seems we can do that easily!

An alternative would be to use the maybe-coming JSX syntax for fragments.
facebook/jsx#84

Nevertheless it still imply creating an array of fragments (instead of an object as for createFragment).

PS. I was having issues with the last version of react-paginate and React r16 due to create-fragment, so I've done this PR. (I think it works on React r16 following the version of react-addons-create-fragment used. But better not use if we can do without: the installation is simpler)

PPS. I updated some bits to make it easier to test the project.

@MonsieurV
Copy link
Collaborator Author

The Node versions for running test have been updated: this was the reason of the failure (Node v4 was getting kind of old for some dependencies to be installed).

I think this is ready to be merged: been using it in production from more than one month now, with no issue.

It will make the module easier to run on React v16 and thus continue to make it attractive... as it rightfully does its job!

@MonsieurV
Copy link
Collaborator Author

I tested the last react-paginate version, which seems to have no issue anymore. (React being updated)

Fragments are out there to use, if we want.

@AdeleD do we merge it or we just drop it?

I can re-submit the PR with the conflicts resolved.

@AdeleD
Copy link
Owner

AdeleD commented Mar 15, 2018

Ok, thank you.
I will merge it this weekend.

They could be generated by the users from their own Webpack (or other)
config
Use Webpack v4 and last Babel versions
…c is simple enough

classnames is great, but including it for using it one time is a bit
overkill
Also for AdeleD#85
(This is just latest jest-cli version that cannot install on Node 5)
@MonsieurV MonsieurV mentioned this pull request Mar 16, 2018
@MonsieurV
Copy link
Collaborator Author

Ok, for me this is ready to merge.

To recap:

  • do not use the react-addons-create-fragment package, which is deprecated (use keys instead)
  • update Babel presets (some where deprecated)
  • update dev packages and configuration to run the demo with latest tools

This should make the project more easier to use in modern React projects.

@AdeleD
Copy link
Owner

AdeleD commented Mar 18, 2018

Thank you very much for your work on this PR!

@AdeleD AdeleD merged commit f0e4fad into AdeleD:master Mar 18, 2018
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

Successfully merging this pull request may close these issues.

2 participants