-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
As a user of the library it's normal to do this:
useTaskQueue({
name: 'test',
codec: json.number,
task: v => [v * 2, v * 3, v * 4],
})The problem is, that doing so in a react component or a wrapper hook, the task function's reference will always "change" therefore React will assume, that our memorized value should be re-evaluated.
const task = useMemo(() => descriptor.task, [descriptor.task]);Gotta somehow fix react's function change detection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working