Hi,
I'm trying to integrate Reach Router with Material UI (see https://codesandbox.io/s/reach-router-starter-v1-cgvin?fontsize=14). When trying to change tabs, the active state of the tab doesn't quite work all the time though the route is changed.
Am I doing anything wrong?
Thank you very much for the lib,
Have a good day!
Hi,
I did a workaround using your example that would maybe help you.
I think the problem was you were handling the tab's change inside each tab instead the tabs container.
Also I changed the 'value' attribute from the tabs for 'index' that could be more readable.
I hope this help you :)
https://codesandbox.io/s/reach-router-integration-with-material-ui-gycwh
PD: I've noticed that if you reload on tab2 or tab3, the tab1 is not working properly on codepen (You'll need to click twice to tab take the click event) but I've tried on my local and seems work!
Hi, thank you very much for the answer!
Actually, I did some refactoring on my code and it sort of fixed itself but I keep handling the changes inside each tab.
I don't know why it wouldn't work in the first place though...
Anyways, cheers :rocket:
Most helpful comment
Hi,
I did a workaround using your example that would maybe help you.
I think the problem was you were handling the tab's change inside each tab instead the tabs container.
Also I changed the 'value' attribute from the tabs for 'index' that could be more readable.
I hope this help you :)
https://codesandbox.io/s/reach-router-integration-with-material-ui-gycwh
PD: I've noticed that if you reload on tab2 or tab3, the tab1 is not working properly on codepen (You'll need to click twice to tab take the click event) but I've tried on my local and seems work!