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

Upgrade to React 17, React Leaflet 3.x #102

Merged
merged 30 commits into from
Apr 27, 2022
Merged

Upgrade to React 17, React Leaflet 3.x #102

merged 30 commits into from
Apr 27, 2022

Conversation

rod-glover
Copy link
Contributor

@rod-glover rod-glover commented Apr 27, 2022

The main driver of this effort is to upgrade React Leaflet to v3.x; see #99 .

React Leaflet 3.x poses some installation problems, as documented in pcic-react-leaflet-components . In this PR we use the working installation documented there.

React Leaflet 3.x requires React 17 as a peer dependency, which in turn requires several other packages to be updgraded, including pcic-react-leaflet-components, react-leaflet, react-select, and react-table. Each of those upgraded packages require a certain amount of work to migrate this project's code.

Finally, there is a peculiarity with react-leaflet-draw. Its latest release, 0.19.8, is in fact compatible with React Leaflet 3.x and React 17, but its package.json states otherwise. Installing it therefore requires an npm install --force command.

Also in this PR are a couple of bug fixes:

  • Fix for datepicker not providing a new Date object each time.
  • Fix computation of data download URLs.

There is no overall change in the code design, simply changes to details to accommodate upgrades. Several components, but not all, have been converted to hooks to simplify working with them.

@rod-glover rod-glover merged commit f539bf2 into master Apr 27, 2022
@rod-glover rod-glover deleted the test-react-17 branch April 27, 2022 23:46
This was referenced Apr 27, 2022
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.

1 participant