Skip to content

Conversation

@draedful
Copy link
Collaborator

feat: add hooks to compute/effect signal
feat: add hook to scheduling task
feat: add hook to handle scene changes(camera+hitbox)

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@draedful draedful changed the title feat(useSignal): refactor useSignal to use useSyncExternalState. feat(useSignal): refactor useSignal to use useSyncExternalState Jan 29, 2026
@draedful draedful force-pushed the more_hooks branch 2 times, most recently from 6a6b48d to 587578c Compare January 31, 2026 16:53
@draedful draedful marked this pull request as ready for review February 1, 2026 23:33
@draedful draedful requested a review from Antamansid as a code owner February 1, 2026 23:33
return {
...options,
};
}, [options.frameInterval, options.frameTimeout, options.priority]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Options here and below are optional. It's better to add question marks here, otherwise it will be an error that options are undefined.
Actual for: useSchedulerDebounce, useSchedulerThrottle, useScheduledTask.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is a mistake - options should be required

return state.block.$geometry.subscribe(() => {
refreshAnchorPosition();
});
}, [state.block]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Think here same? State may be undefined.
Maybe state?.block.

});
}, [viewState]);

const containerClassNames = useMemo(() => {
Copy link
Collaborator

@Antamansid Antamansid Feb 2, 2026

Choose a reason for hiding this comment

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

nit: Think we can do without usememo here.
Nevertheless, of course, it's easier to read this way, I agree.

feat: add hooks to compute/effect signal
feat: add hook to scheduling task
feat: add hook to handle scene changes(camera+hitbox)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants