Message from JavaScript discussions

May 2019

— Any suggestions

— 

This is react-router-dom?
If your component is not inside a switch and a route component there is no reason to remounting.
Also, if you want to force the remounting you may want to put a key (like on items on a list) on your component and change it every time you want to remount the component.

— Load a what?

— What do i need to learn to jump into mob applications after js?

— Yep using react-router-dom.

— So don't the component unmount on changing the route ?

— It depends, it’s inside a router?

— I defined all my routes in one file. And I have a component A with url "/test". I have a button in the component A. When I click the button it redirects to another url "/test2". But that also renders the same component A

Message permanent page

— In the case the component state is being being restored

— I mean that whatever changes I made in component A when on url "/test1", all the changes are being restored in url "/test2"

Message permanent page

— I’ve just tested, and apparently yes, this is a normal behavior, you don’t want it?

— You could wrap the component like: const B = props => <A {...props} />