reakit v1.0.0-rc.0 Release Notes

Release Date: 2020-03-30 // about 4 years ago
  • ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix Tabbable dispatching click twice when it's composed by another Tabbable (#553) (d231120)

    ๐Ÿ”‹ Features

    • โž• Add Clickable component (#596) (6a9fca9)
    • โž• Add DisclosureContent component (#554) (fd93b08)
    • Automatically check Radio on focus (#599) (6edc689)
    • โœ‚ Remove Provider from reakit/utils/Provider (134f7eb)
    • 0๏ธโƒฃ Select the first Tab by default and don't require stopId prop (#597) (528b016)
    • ๐Ÿ‘Œ Support rtl on Toolbar (#601) (2811071)

    ๐Ÿ’ฅ BREAKING CHANGES

    • 0๏ธโƒฃ The first Tab is now selected by default. There's no need to pass selectedId to useTabState 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 pass null to selectedId:

      // 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 and unregister on the returned object of state hooks have been renamed to items, registerItem and unregisterItem, 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, use Clickable 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 from reakit/utils is not supported anymore. It should be imported from reakit/Provider or reakit.
    • DisclosureRegion has been renamed to DisclosureContent.