@neo4j-nvl/react 0.3.6-ade05d13 → 0.3.6-d168b648

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,10 +26,14 @@ describe('BasicNvlWrapper', () => {
26
26
  jest.spyOn(NVL.prototype, 'destroy').mockImplementation(destroy);
27
27
  const { unmount } = render(_jsx("div", { children: _jsx(BasicNvlWrapper, { nodes: [], rels: [] }) }));
28
28
  unmount();
29
- expect(destroy).toHaveBeenCalled();
29
+ expect(NVL).toHaveBeenCalledTimes(1);
30
+ expect(destroy).toHaveBeenCalledTimes(1);
30
31
  });
31
32
  test('successfully re-initialises NVL when using React StrictMode', () => {
33
+ const destroy = jest.fn();
34
+ jest.spyOn(NVL.prototype, 'destroy').mockImplementation(destroy);
32
35
  render(_jsx(React.StrictMode, { children: _jsx("div", { children: _jsx(BasicNvlWrapper, { nodes: [], rels: [] }) }) }));
33
36
  expect(NVL).toHaveBeenCalledTimes(2);
37
+ expect(destroy).toHaveBeenCalledTimes(1);
34
38
  });
35
39
  });
@@ -63,7 +63,7 @@ export const BasicNvlWrapper = memo(forwardRef(({ nodes, rels, layout, layoutOpt
63
63
  nvlRef.current = null;
64
64
  };
65
65
  // eslint-disable-next-line react-hooks/exhaustive-deps
66
- }, [containerRef.current]);
66
+ }, []);
67
67
  useEffect(() => {
68
68
  if (nvlRef.current === null) {
69
69
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-nvl/react",
3
- "version": "0.3.6-ade05d13",
3
+ "version": "0.3.6-d168b648",
4
4
  "main": "lib/index.js",
5
5
  "homepage": "https://neo4j.com/docs/nvl/current/",
6
6
  "license": "SEE LICENSE IN 'LICENSE.txt'",
@@ -34,8 +34,8 @@
34
34
  "babel-eslint": "^10.1.0"
35
35
  },
36
36
  "dependencies": {
37
- "@neo4j-nvl/base": "0.3.6-ade05d13",
38
- "@neo4j-nvl/interaction-handlers": "0.3.6-ade05d13",
37
+ "@neo4j-nvl/base": "0.3.6-d168b648",
38
+ "@neo4j-nvl/interaction-handlers": "0.3.6-d168b648",
39
39
  "lodash": "4.17.21",
40
40
  "react": "^18.2.0",
41
41
  "react-dom": "^18.2.0"