The idea is that you will need to extend each component where you want "auto updating" to happen. On each of these components during init you will need to create a setInterval
function that calls the specific method of that component to update the content. As an example, DiscussionPage
has the load
method that would need to be called repeatedly.
There are a few considerations though, for instance the DiscussionPage might be at the top; loading posts from the backend with that method will probably just refresh those posts in view. In addition you could possibly simplify the logic for checking for new posts when you are at the end of the Posts list by hitting the endpoint for the discussion, see what the lastPost id is and if they don't match with the one currently loaded in the frontend, do a refresh.
These are just some thoughts; my approach (which is very inefficient) is to try some things out; see what works.