The React frontend of my dapp successfully fetches the data from the private blockchain (Ganache) and updates the states accordingly.
However, when I trigger a function via
onClick that updates the states, the states render the proper values only when I refresh the page.
What's the most effective way of refreshing the states after a MetaMask transaction?
UPDATE: I was thinking that maybe there could be some way of refreshing the page via Web3js and adding that part into the promise function?
I.E. onClick -> func1.then() -> refresh