reakit v1.0.0-rc.0 Release Notes
Release Date: 2020-03-30 // about 4 years ago-
๐ Bug Fixes
๐ Features
- โ Add
Clickable
component (#596) (6a9fca9) - โ Add
DisclosureContent
component (#554) (fd93b08) - Automatically check
Radio
on focus (#599) (6edc689) - โ Remove
Provider
fromreakit/utils/Provider
(134f7eb) - 0๏ธโฃ Select the first
Tab
by default and don't requirestopId
prop (#597) (528b016) - ๐ Support
rtl
onToolbar
(#601) (2811071)
๐ฅ BREAKING CHANGES
- 0๏ธโฃ The first
Tab
is now selected by default. There's no need to passselectedId
touseTabState
anymore.
If you're already using
selectedId
to select a tab in the initial render, you don't need to change anything as this still works. But, if you want to render tabs with none selected, you should now passnull
toselectedId
:// if you're already using selectedId, there's no need to change anything const tab = useTabState({ selectedId: "tab-1" });
// when there's no tab selected by default, you now need to explicitly specify it - const tab = useTabState(); + const tab = useTabState({ selectedId: null });
- Most users will not be affected by this, but
stops
,register
andunregister
on the returned object of state hooks have been renamed toitems
,registerItem
andunregisterItem
, respectively.
const tab = useTabState(); - tab.stops.map(...); + tab.items.map(...); - tab.register(...); + tab.registerItem(...); - tab.unregister(...); + tab.unregisterItem(...);
Tabbable
doesn't trigger a click on the element when pressing Enter and Space anymore. If you need that feature, useClickable
instead.
Before:
import { Tabbable } from "reakit/Tabbable"; <Tabbable />
After:
import { Clickable } from "reakit/Clickable"; // Tabbable is not going away, it just doesn't represent a clickable element // anymore <Clickable />
- ๐ Importing
Provider
fromreakit/utils
is not supported anymore. It should be imported fromreakit/Provider
orreakit
. DisclosureRegion
has been renamed toDisclosureContent
.
- โ Add