I need to get a dom reference for a stateless react component during componentDidMount
using recompose
. I tried to inspect this
inside that function bu I cannot get a reference of the dom.
I would like to know how to access the dom for that component.
const ComponentX = ({
classes,
}: Props) => (
<div>
Some content
</div>
)
export const ComponentX = compose<Props, OuterProps>(
lifecycle({
componentDidMount() {
// get a reference component dom
},
}),
setDisplayName('ComponentX'),
injectSheet(styles),
)(ComponentXComp)