question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useZoomPanHelper() issue

See original GitHub issue

Hi, I’m trying just to call fitView and this error appears, trying search but found nothing, what can I do?

I put just this line of code: const { fitView } = useZoomPanHelper();

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
YukioSenpaicommented, Oct 7, 2021

In case someone is asking the same question, you have to put the proivder in the parent file. Example: <ReactFlowProvider><FlowEditionPage /></ReactFlowProvider>

0reactions
YukioSenpaicommented, Apr 12, 2022

You can just use an useEffect and put fitView in the dependancies

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate to v10 Guide - React Flow
Rename useZoomPanHelper to useReactFlow (and setTransform to setViewport ); Rename node and edge option isHidden to hidden. Detailed explanation of breaking ...
Read more >
React-flow & dare: reactFlowInstance.fitView() fits the instance ...
My problem is that when I hit the button, I want to change the layout of the graph, which happens and I am...
Read more >
react-flow - CodeSandbox
useZoomPanHelper,. useStoreState, ... const OverviewFlow = () => { ... Problems. 1. React DevTools. 0. All, Info, Warning, Error, Debug. dd25ca83d.
Read more >
Implementing a scrollbar for React Flow | by Christian Mähler
import {useStore, useZoomPanHelper} from 'react-flow-renderer'; ... getState().transform returns the current center as tx, ...
Read more >
could not find react-redux context value - You.com
The error pointed to the line where useZoomPanHelper() is called, so I think it is also related to this issue , which haven't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found