Closed mrjjwright closed 8 years ago
Hi, John. To get a dom ref inside a component use this.getDomRef(refName)
https://github.com/dfilatov/vidom/wiki/Component-methods#getdomref
But how to set a dom ref to the root node of the component?
On Tue, Oct 13, 2015 at 3:30 PM, Filatov Dmitry notifications@github.com wrote:
Closed #151 https://github.com/dfilatov/vidom/issues/151.
— Reply to this email directly or view it on GitHub https://github.com/dfilatov/vidom/issues/151#event-434554191.
Just as well for other nodes.
Plain js:
onRender() {
return this.setDomRef('bla', node('div'));
}
JSX:
onRender() {
return <div ref="bla"></div>
}
Thanks!!
Sent from my iPhone
On Oct 14, 2015, at 2:06 AM, Filatov Dmitry notifications@github.com wrote:
Just as well for other nodes.
Plain js:
onRender() { return this.setDomRef('bla', node('div')); } JSX:
onRender() { return
} — Reply to this email directly or view it on GitHub.
I am sorry, but how do you get a dom ref inside a component? I couldn't figure this out in the docs.
Thanks and awesome lib!