0

I am making a react application. Can I change the "tab content area" on a button click using react-router. I have two tabs. I want to change content of one of the tab when I click a button. Everything else on the page should remain same but the content of the tab. How can I do this?

EdG
  • 2,243
  • 6
  • 48
  • 103

1 Answers1

0

I am not very knowledgeable on react-router but I would recommend using material-ui. It's very neat and extremely easy to implement (albeit, there are some changes you need to make before using it).

If you still want to use react-router for your tabs, I did find a few solutions that might help you.

Possible solution #1

Possible solution #2

Community
  • 1
  • 1
Adam Loh
  • 111
  • 1
  • 9
  • I am using material ui tabs only. But I want to change what I see in a tab to change on a button click. For example: There is a list view in my one of my tab and I want it to fade out and something else to replace that are when I click a button. What should I do to achieve this? – EdG Sep 27 '16 at 10:43
  • Can you edit your original post and show what you have done? At least I can know what to explain. – Adam Loh Sep 28 '16 at 02:25