import { useState , useEffect } from 'rax' ; export default function TabBarWrapper ( { renderTabBar , history } ) { const [ , setPathName ] = useState ( history . location . pathname ) ; useEffect ( ( ) => { const unlisten = history . listen ( ( ) => { setPathName ( history . location . pathname ) ; } ) ; return unlisten ; } , [ ] ) ; return renderTabBar ( ) ; }