v9

Orbit Migration Guide v9

Breaking changes

react-uid vs React.useId

  • import * as React from "react";
    export const Root = (props: Props) => {
    return (
    <OrbitProvider theme={theme} useId={React.useId}>
    {children}
    </OrbitProvider>
    );
    };
    • install react-uid in your dependencies (yarn add react-uid)
    • pass react-uid’s useUID export in the useId prop, as well as mounting two providers (UIDReset and UIDFork), like so
    import { useUID, UIDReset, UIDFork } from "react-uid";
    export const Root = (props: Props) => {
    return (
    <UIDReset>
    <UIDFork>
    <OrbitProvider theme={theme} useId={useUID}>
    {children}
    </OrbitProvider>
    </UIDFork>
    </UIDReset>
    );
    };

Deprecations

ClickOutside

<ClickOutside onClickOuside={...}>
<div>
Some content
</div>
</ClickOutside>
useClickOutside(ref, ev => ...);
<div ref={ref}>
Some content
</div>

Flow types

Removed previously deprecated components

  • FormFeedback
  • InputField
  • InputFile
  • InputGroup
  • Select
  • Textarea