Comments (4)
I'm seeing a related issue using Storyshots
Invariant Violation: getNodeFromInstance: Invalid argument.
at invariant (node_modules/fbjs/lib/invariant.js:44:15)
at Object.getNodeFromInstance (node_modules/react-dom/lib/ReactDOMComponentTree.js:162:77)
at Object.findDOMNode (node_modules/react-dom/lib/findDOMNode.js:49:41)
at ContainerDimensions.componentDidMount (node_modules/react-container-dimensions/lib/index.js:72:44)
at node_modules/react-test-renderer/lib/ReactCompositeComponent.js:265:25
at measureLifeCyclePerf (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:75:12)
at node_modules/react-test-renderer/lib/ReactCompositeComponent.js:264:11
at CallbackQueue.notifyAll (node_modules/react-test-renderer/lib/CallbackQueue.js:76:22)
at ReactTestReconcileTransaction.close (node_modules/react-test-renderer/lib/ReactTestReconcileTransaction.js:36:26)
at ReactTestReconcileTransaction.closeAll (node_modules/react-test-renderer/lib/Transaction.js:206:25)
at ReactTestReconcileTransaction.perform (node_modules/react-test-renderer/lib/Transaction.js:153:16)
at batchedMountComponentIntoNode (node_modules/react-test-renderer/lib/ReactTestMount.js:69:27)
at ReactDefaultBatchingStrategyTransaction.perform (node_modules/react-test-renderer/lib/Transaction.js:140:20)
at Object.batchedUpdates (node_modules/react-test-renderer/lib/ReactDefaultBatchingStrategy.js:62:26)
at Object.batchedUpdates (node_modules/react-test-renderer/lib/ReactUpdates.js:97:27)
at Object.render (node_modules/react-test-renderer/lib/ReactTestMount.js:125:18)
at Object.test (node_modules/@storybook/addon-storyshots/dist/test-bodies.js:21:44)
at Object.<anonymous> (node_modules/@storybook/addon-storyshots/dist/index.js:148:25)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
at process._tickCallback (internal/process/next_tick.js:103:7)
Apparently there is a related fix implemented in souporserious/react-measure#35
from react-container-dimensions.
Should this be fixed in this lib? PR is more than welcome!
from react-container-dimensions.
I dunno. It looks like the approach for react-measure
was to entirely avoid findDOMNode
and use a ref
instead. That required a change to react-measure
and some changes to its usage. Since I wasn't heavily invested in react-container-dimensions
I ended up switching to react-measure
which worked for my limited use case.
from react-container-dimensions.
With storyshots now, it's getting kicked out by ContainerDimensions directly - At least one element required.
from react-container-dimensions.
Related Issues (20)
- element-resize-detector not removed correctly on componentWillUnmount HOT 12
- React router props not passed to wrapped component HOT 2
- An in-range update of babel-cli is breaking the build 🚨 HOT 1
- An in-range update of enzyme is breaking the build 🚨 HOT 2
- What is the best way of getting updated top and left values? HOT 3
- An in-range update of mocha is breaking the build 🚨
- An in-range update of lint-staged is breaking the build 🚨 HOT 4
- Container height always zero HOT 1
- Version 10 of node.js has been released
- Calling onResize callback after the component is unmounted
- When print it's not pass the correct width HOT 1
- [Typescript] index.d.ts is not published HOT 1
- Adding a Debounce HOT 7
- Deprecation warnings for [email protected]+ under StrictMode HOT 2
- container updates slow down d3-force convergence HOT 2
- Width and height are initially zero on Apple iPad Safari HOT 1
- Resize not reported for particular case where listener element is in flex layout HOT 1
- Emits warning about prop 'initiated'
- Size calculated is slightly different with size rendered in the browser HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-container-dimensions.