Skip to content

Rewrite component from class-based to functional #267

@RaphaHsu

Description

@RaphaHsu

Rewrite component from class-based to functional

  1. Rewrite static member and render fn.
class Button extends Component {
  static option = () => {}
  render() {
     return (/* <Component /> */)
  }
}
const Button = () => {
  return (/* <Component /> */)
}

Button.option = () => {}
  1. Rewrite state and lifecycle hook fns by React Hooks

Metadata

Metadata

Assignees

Labels

javascriptPull requests that update Javascript code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions