Package Exports
- reakit
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (reakit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Minimalist and highly composable building blocks built on top of React and styled-components.
If you find this useful, please don't forget to star ⭐️ the repo, as this will help to promote the project.
Follow me on Twitter and GitHub to keep updated about this project and others.
Install
Yarn:
yarn add reakitnpm:
npm install --save reakitExample

See and edit full source code on CodeSandbox
import React from "react";
import { render } from "react-dom";
import { Button, Popover } from "reakit";
const App = () => (
<Popover.Container>
{popover => (
<Button as={Popover.Toggle} {...popover}>
Toggle
<Popover {...popover}>
<Popover.Arrow />
Popover
</Popover>
</Button>
)}
</Popover.Container>
);
render(<App />, document.getElementById("root"));Performance
Benchmark done using react-benchmark with MacBook Pro (Retina, 13-inch, Late 2013). Clone the repository and run yarn && yarn benchmark to see the results.
| Library | ops/sec |
|---|---|
| react | 103,029 |
reakit (as) |
45,975 |
| antd | 29,122 |
reakit (Base) |
17,071 |
reakit (Button) |
12,107 |
| material-ui | 9,840 |
| rebass | 7,989 |
License
MIT © Diego Haz