As with any ecosystem there are many components that go to make a healthy and resilient system such as the Great Barrier Reef. The picture above shows a tributary off Trinity Inlet lined by dense mangrove forest on a beautiful sunny Cairns day. The mangroves provide home to hundreds of different species ranging from egrets and ospreys to mudskippers and crocodiles. The root systems are dense and interweave with roots from other trees to provide a very stable base for the mangrove forest. These roots serve many functions in the environment from protection for the many different fish species inhabiting the inlet to filter system. The dense root systems trap sediment and impede the tidal flow thus helping clean the water of heavy metals, silt, and other contaminents both natural and deposited by man.
The seeds drop to the mud or water and can float until they are washed to a suitable bank where they will then grow.
The picture below shows the dense mangrove forest with the individual trees packed together closely competing for both sunlight and forming a dense root system.