Skip to content

Got eslint Warn with sensors #814

Answered by clauderic
MatteoGauthier asked this question in Q&A
Discussion options

You must be logged in to vote

You can import useSensors from @dnd-kit/core which uses useMemo internally to memoize the sensors:

import {useSensors} from '@dnd-kit/core';

const sensors = useSensors(
  useSensor(PointerSensor)];
);

Having said that, I'm not sure why you need to memoize the rendered JSX for your shapes list, seems completely un-necessary.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MatteoGauthier
Comment options

Answer selected by clauderic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants