klendi / react-top-loading-bar

A very simple, highly customisable youtube-like react loader component.
https://klendi.github.io/react-top-loading-bar/
MIT License
708 stars 60 forks source link

Support for React v17 #49

Closed khooz closed 3 years ago

khooz commented 3 years ago

Is there gonna be a version bump for react 17?

I have reviewed the source code and I think it's pretty compatible with react 17, since you have started function components and hooks from the start.

I will very much appreciate if you announce whether you're going to support it, or should I fork, or whether I can submit a pull request.

Also tests can really help the PR and maintenance process.

Thanks for your awesome component!

Cheers.

unekinn commented 3 years ago

We're using it with react 17 and haven't noticed any problems or warnings, so I think updating the peer dependency version range to include react 17 should be safe.

I would love an update, as right now we have to use e.g. npm update --legacy-peer-deps to account for the "wrong" dependency on exactly version 16.

EDIT: Fairly certain something like

  "peerDependencies": {
    "react": "^16 || ^17"
  },

would work fine, based on what react-redux is doing

klendi commented 3 years ago

Yes there will be support for react 17 since I don't think there are any breaking changes. I will have to work on it but I have been busy lately studying for graduation exams. Any PRs are welcome!

michielvanderros-tomtom commented 3 years ago

This issue is popping up in Yarn all the time for us too. PR #47 may be a suitable candidate to include this improvement.