Answer the question
In order to leave comments, you need to log in
How does a higher order component understand data from an embeddable?
I have the following code, a higher order component that returns another component, in the inline method,
componentwillreceiveprops has data returned by console.log, how was it received from the Component?
import React fromt 'react';
function logProps(Component){
return class extends React.Component{
componentWillRecieveProps(nextProps){
console.log('prevProps', this.props); // ???
console.log('prevProps', nextprops);//???
render(){
return <Component {...this.props} />
}
}
}
}
export default logProps;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question