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

Upgrading to support React v17+ #50

Open
jonaslagoni opened this issue Nov 13, 2023 · 0 comments
Open

Upgrading to support React v17+ #50

jonaslagoni opened this issue Nov 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jonaslagoni
Copy link
Member

Reason/Context

Right now we are limited to React 16 which is limiting integration options with for example Studio. There are two things that need to be upgraded, react + webpack and react-flow-renderer (renamed to reactflow dependency).

Breaking changes moving from v9 to v11:

v10 breaking changes:

  • Split the elements array into nodes and edges arrays and implement onNodesChange and onEdgesChange handlers (detailed guide in the core concepts section)
  • Memoize your custom nodeTypes and edgeTypes
  • Rename onLoad to onInit
  • Rename paneMoveable to panOnDrag
  • Rename useZoomPanHelper to useReactFlow (and setTransform to setViewport)
  • Rename node and edge option isHidden to hidden

v11 breaking changes:

  • Changed name to reactflow instead of react-flow-renderer
  • Importing CSS is mandatory
  • defaultPosition and defaultZoom have been merged to defaultViewport
  • Removal of getBezierEdgeCenter, getSimpleBezierEdgeCenter and getEdgeCenter
  • Removal of onClickConnectStop and onConnectStop
  • Pan over nodes

This probably also mean we have to upgrade webpack to the newest versions. Maybe we can follow something like https://medium.com/naukri-engineering/migrating-a-react-16-application-to-react-18-with-webpack-5-435d044b846

@jonaslagoni jonaslagoni added the enhancement New feature or request label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant