I'm trying to create a tabbed section for comments in react, one tab for personal comments and one tab for others comments. I'm using react-tabs package for creating tabs and tab panels and simple-react-comment package inside it to show comments. Loading old comments from database is done, and the user is able to insert new comment. but the problem is that new inserted comment won't be shown unless you change tabs. I tried setting selectedIndex to change selected tab programmatically. but couldn't get what I wanted. How can I re-render the tabs component so that new comments be shown?
Asked
Active
Viewed 127 times