You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the Tab component and importing it to my page
Expected
The Tab should do this: there shouldn't be any errors or warnings
Result
The Tab does not do this: the browser gives a warning:
Warning: getInitialState was defined on Tab, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?
The Tab.js (in the semantic-ui-react node_module) is using getInitialState which is not used in ES6
getInitialState() {
return { activeIndex: 0 }
}
Could you please help me with this if there is a way to fix this or is changing the syntax to ES6 by using constructor and assigning the state is the only way to go?
Thanks!
Steps to Reproduce
Expected
The Tab should do this: there shouldn't be any errors or warnings
Result
The Tab does not do this: the browser gives a warning:
The Tab.js (in the semantic-ui-react node_module) is using getInitialState which is not used in ES6
Could you please help me with this if there is a way to fix this or is changing the syntax to ES6 by using constructor and assigning the state is the only way to go?
Thanks!
Testcase
If the docs show the issue, use: https://react.semantic-ui.com/modules/tab#tab-example-secondary-pointing
Otherwise, fork this to get started: http://codepen.io/levithomason/pen/ZpBaJX
The text was updated successfully, but these errors were encountered: