Closed eunnovax closed 5 years ago
ComponentDidMount is after render() lifecycle, so you can instantiate in before render() lifecycle method. Like constructor or unsafe_componentWillMount. But,unsafe_componentWillMount is not good solution https://ja.reactjs.org/docs/react-component.html
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.
Hey Truffle team,
Please help to instantiate the contract before it is called within react component methods. Currently, contract is NOT instantiated before it is called. I'm receiving the above error while trying to call contract method. The error basically means React custom methods inside render() function are called BEFORE contract is instantiated.