Skip to content

Conversation

@rickhanlonii
Copy link
Member

No description provided.

@meta-cla meta-cla bot added the CLA Signed label Nov 14, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Nov 14, 2025
isUseReducerType(id) || // dispatcher
type_.shapeId === 'BuiltInUseTransition' // startTransition
type_.shapeId === 'BuiltInUseTransition' || // startTransition
isUseOptimisticType(id) // setOptimistic
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh idk what this function is doing and why some hooks use type._shapeId directly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we just didn't add isFooType() helpers for all the types checked here


export function isUseOptimisticType(id: Identifier): boolean {
return (
id.type.kind === 'Function' && id.type.shapeId === 'BuiltInUseOptimistic'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id.type will be Object i think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants