I need to display a message (in my react app) when the block count reaches a particular number. I tried using web3.eth.subscribe but MetaMask provider does not support that. So is there any other way i can listen to block updates in the blockchain (using ganache for dev).
One module on npm for this use is eth-block-tracker. It uses polling under the hood, but MetaMask caches redundant requests, so it’s not much worse than MetaMask’s background polling is already.