Rewrite component from class-based to functional
- Rewrite static member and render fn.
class Button extends Component {
static option = () => {}
render() {
return (/* <Component /> */)
}
}
const Button = () => {
return (/* <Component /> */)
}
Button.option = () => {}
- Rewrite state and lifecycle hook fns by React Hooks