From twitter.
https://twitter.com/rossipedia/status/921138316677976064
I don't know much about TS so I need outside help on this one.
cc @cameron-martin @renatorib
What's innerRef?
innerRef allows you to get reference to inner component.
const MyEmotionComponent = styled('div')`color:red`;
let myRef;
<MyEmotionComponent ref={(ref) => myRef = ref} /> // myRef - MyEmotionComponent
<MyEmotionComponent innerRef={(ref) => myRef = ref} /> // myRef - div element
While we're talking abut extra props for components, there is also css prop.
I'm doing the TypeScript definitions for them now and I'll send a PR in a sec.
While we're talking abut extra props for components, there is also css prop.
Definitions for the css prop were added here: https://github.com/emotion-js/emotion/pull/416
Most helpful comment
innerRefallows you to get reference to inner component.While we're talking abut extra props for components, there is also
cssprop.