@jay: I found using className=‘center’ adds ‘list-item__center list-item–chevron__center’ at runtime, but alternatively for className=‘title’ does not add ‘list-item__title list-item–material__title’ for sub element. Very confusing!
@Songkeys not after but it is indeed part of the DOM rendering. You can do what @Fran-Diox suggested or if you really want to use that hook you can wait for page init, when everything is already set up:
@ephraimt@munsterlander I am not sure that this demo actually works the way it is described. The initial active tab is being set correctly through index. However, if you setState in the prechange to always be index 0 you can still swap between the tabs.
In my application I can get the tabbar to be a “controlled” component, it always selects the tab you click. This looks like it is happening on the internal onClick method of ons-tabbar that is overriding the setActiveTab method in the React component.