How to optionally append components to the output of a gutenberg block?

How to optionally append components to the output of a gutenberg block?