Just like subscribing to balance changes, this will trigger an event every time a new block is mined, and publish a state with the block number.
This action doesn't have any fields, just run it after the api was initialised.
After subscribing you can of course unsubscribe by running this action and receiving events about new blocks.
This is the event that will be triggered every time a new block is mined.
In this state you will find the number of the latest block.
Find a demo on the polkadot apiarrow-up-right page. See the workflow folder Subscribe blocks
Last updated 3 years ago