Closed wadjih-bencheikh18 closed 2 years ago
i found that there's an infinite loop in every plot
after searching i found that the problem is in this useMemo https://github.com/zakodium-oss/react-plot/blob/ae14c2c36260f258e63a95eaad93b38190fe1611/src/contexts/plotContext.ts#L192
after checking hook dependency, the problem was with state.axes
state.axes
when i removed state.axes dependency from the hook everything is running perfectly (even NMR example)
i found that there's an infinite loop in every plot
after searching i found that the problem is in this useMemo https://github.com/zakodium-oss/react-plot/blob/ae14c2c36260f258e63a95eaad93b38190fe1611/src/contexts/plotContext.ts#L192
after checking hook dependency, the problem was with
state.axes
when i removed
state.axes
dependency from the hook everything is running perfectly (even NMR example)