Skip to content

🌻 A react-hooks + antd library from Alipay Industry Technology department.

License

Notifications You must be signed in to change notification settings

simpleler/sunflower

 
 

Repository files navigation

sunflower

Collection of React Hooks returning components of antd.

build status Test coverage node version

🎩  Features

  • 🏄 Easy to use. You don't need to know too much about state and change methods to use components with interaction logic.
  • 💅 Easy to customize. You can easily customize the combination of components you need.
  • 👯 Layered design. You can use react-hooks without ui or react-hooks with antd.
  • 🤾‍ Hooks return higher-order component (HOC). Crazy, but it does give you a more convenient api. At the same time you can choose not to use.

🤔  Why?

    Usually, we use multiple antd components, and we organize their relationship through state and props methods like value, onChange.

    Is there a way to reduce the process code and describe the relationship between multiple ui components? How can we use a way to use existing processes?

    Yes,we can use react-hooks, so the relationship between multiple antd components will be in react-hooks.Further, we use HOC as the api, so we don't have to care about the state and methods.

⚠️ Warning

This project is still under development.

📟  Usage

Install the react-hooks you need

eg: @sunflower-antd/form-table

$ npm install @sunflower-antd/form-table --save
import { useFormTable } from '@sunflower-antd/form-table';

function Component(props) {
  const { Form, Table } = useFormTable(config);
  return <div>
    <Form />
    <Table />
  </div>;
}

ReactDOM.render(<Component />, mountNode);

⚒  Development

$ yarn
$ yarn bootstrap
$ yarn dev       // dev
$ yarn build     // build
$ yarn test      // test

About

🌻 A react-hooks + antd library from Alipay Industry Technology department.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 51.5%
  • JavaScript 48.5%