You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
ERROR in [at-loader] ./stories/button/story.common.tsx:8:18
TS2769: No overload matches this call.
Overload 1 of 2, '(props: ButtonProps | Readonly<ButtonProps>): Button', gave the following error.
Type 'MutableRefObject<Button | undefined>' is not assignable to type'(string & ((instance: Button | null) => void)) | (string & RefObject<Button>) | (((instance: Button | null) => void) & ((instance: Button | null) => void)) | ... 4 more ... | undefined'.
Type 'MutableRefObject<Button | undefined>' is not assignable to type'React.RefObject<Button> & RefObject<Button>'.
Type 'MutableRefObject<Button | undefined>' is not assignable to type'RefObject<Button>'.
Types of property 'current' are incompatible.
Type 'Button | undefined' is not assignable to type'Button | null'.
Type 'undefined' is not assignable to type'Button | null'.
Overload 2 of 2, '(props: ButtonProps, context: any): Button', gave the following error.
Type 'MutableRefObject<Button | undefined>' is not assignable to type'(string & ((instance: Button | null) => void)) | (string & RefObject<Button>) | (((instance: Button | null) => void) & ((instance: Button | null) => void)) | ... 4 more ... | undefined'.
Type 'MutableRefObject<Button | undefined>' is not assignable to type'React.RefObject<Button> & RefObject<Button>'.
Type 'MutableRefObject<Button | undefined>' is not assignable to type'RefObject<Button>'.
ERROR in [at-loader] ./stories/button/story.common.tsx:235:15
TS2322: Type '{ root: Types.StyleRuleSet<Types.ViewStyle>[]; content: { borderRadius: number; }; label: { color: string; }; icon: { color: string; }; }' is not assignable to type'StyleRuleSetRecursive<StyleRuleSet<ButtonStyle>>'.
Object literal may only specify known properties, and 'root' does not exist intype'ButtonStyle | StyleRuleSetRecursiveArray<StyleRuleSet<ButtonStyle>>'.
Impact
1- Can't use the React.useRef hook
2- Can't use React.forwardRef
Workaround
Wrap the component and use a callback to transform the mutable ref in a callback.
Current behavior:
Passing a MutableRef to a Button rises an error.
Error received
Impact
1- Can't use the React.useRef hook
2- Can't use React.forwardRef
Workaround
Wrap the component and use a callback to transform the mutable ref in a callback.