Let's build a Todo example using React Pluggable.
The Todo list will appear when the login button is clicked. Although we are not doing actual authentication here, let's suppose that authentication is successful. In this case, we dispatch an event Auth.authenticated from AuthPlugin. The event is listened to by the ToDoPlugin which ultimately renders the Todo component.
On clicking the logout button, Auth.loggedOut event is dispatched from the AuthPlugin and listened to by the TodoPlugin, which stops the rendering of the Todo component.