Take into account that some style attributes of the components should be pass as props to the new react component. Searching among the examples in the documentation can help you to detect which ones. For example:
{/*semantic ui element*/} <div className="ui inverted blue menu"><div> --> {/*Equivalent Semantic-UI-REact element*/} import {Menu} from 'semantic-ui-react'; <Menu inverted="true" color="blue" secondary> |
Add the aria-labels and data tooltip attributes to the elements. For example, for a button:
{/*semantic ui element*/} <button class="ui button" type="button" aria-label='Click Here' data-tooltp='Click Here'> Click Here</button> {/*Equivalent Semantic-UI-React element*/} import React from 'react'; import { Button } from 'semantic-ui-react'; <Button aria-label='Click Here' data-tooltp='Click Here'> Click Here </Button> |
I've checked it is possible to use both types of components together. So, it could be possible create new elements using Semantic-UI-React elements, and recode previous elements step by step when we have enough time.
In that case, it should be necessary recode all our components, one by one, changing semantic UI elements to Semantic UI React elements, following the steps explained in section Procedure.
Another possible problem is the use of the attribute “ref” in our react components. The documentation (https://facebook.github.io/react/docs/refs-and-the-dom.html) explains that is needed to use it as a callback, and sometimes it is not used in that way in our platform. Seems that new react-semantic-ui doesn’t support the old way. For example:
{/*Old way*/} <div className=”ui inverted menu ” ref=”header”> {/* New way*/} <div className=”ui inverted menu ” ref={(header)=>{this.headerMenu=header}}> |
Current main menu of our platform:
Semantic Ui React main menu of our platform: