Comments (6)
I've never seen findDOMNode
return null
unless there's an error in your rendering. The render
function must ALWAYS return an element, so every component must had a DOM node.
My suspicion is that your DOM tree is being modified by the browser, which would normally cause an invariant violation as well. See here: http://stackoverflow.com/questions/25026399/uncaught-error-invariant-violation-findcomponentroot-110-unable-to
In any case, I need an easily reproducible example in order to be able to fix anything. findDOMNode
always returns a value for valid React trees.
from rquery.
Not a bug in rquery
, from what I can tell.
from rquery.
Why the render
function must ALWAYS return an element?
The documentation says that the render
function may return null
You can also return
null
orfalse
to indicate that you don't want anything rendered. Behind the scenes, React renders a<noscript>
tag to work with our current diffing algorithm. When returningnull
orfalse
,ReactDOM.findDOMNode(this)
will returnnull
.
from rquery.
Hmm, I had missed that change in the React spec. In previous versions render
was definitely required to return something.
from rquery.
Fix released as version 4.3.0. Hopefully that works for you. Thanks for the bug report!
from rquery.
Yes, its works for me. Thank you!
from rquery.
Related Issues (12)
- Add more CSS-style selectors HOT 2
- Shouldn't get() return the actual underlying component? HOT 2
- Lodash is undefined in nodejs HOT 4
- Clicking doesn't work as expected HOT 12
- Extending RQuery? HOT 1
- Doesn't work with shallow rendering HOT 3
- find with css-style selectors HOT 7
- can't find component in subqueries HOT 4
- Difficulty initializing from Travis CI HOT 5
- npm@latest gives version 2.0.9 of the library HOT 1
- Can't find child component using Shallow Rendering. HOT 2
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 rquery.