react-ink | A React component for adding material design style ink | User Interface library
kandi X-RAY | react-ink Summary
kandi X-RAY | react-ink Summary
Add the Material Design ripple effect to React component.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize the store
- click animation loop
- Merge properties from one object into another .
- Calculate the radius of a colour
- Calculate a blur opacity for a given opacity .
- ease in out
- Gets the blur state of a blur .
- Gets the release state for a mouse event
- Returns the maximum radius of the given radius .
- Get the opacity for a given opacity
react-ink Key Features
react-ink Examples and Code Snippets
Community Discussions
Trending Discussions on react-ink
QUESTION
so basically what I want to reach is to get dimensions of the div element inside return method of component. I get reference to this by ref and I want to get its width and height with getBoundingClientRect()
but there is error: Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined
. I also tried offsetWidth
and offsetHeight
.
Here is my code:
...ANSWER
Answered 2017-Jan-04 at 17:05You can't get a reference to a DOM node before it was rendered.
Do your this.refs.button.getBoundingClientRect()
in the componentDidMount
lifecycle method to be sure it was rendered and you can get a reference to it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-ink
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page