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
The tutorial is a bit out of date, and there's a few small changes that need to be made for it to work.
One is that innerRef is changed to ref.
Another is that props passed to styled-components (e.g. isDragging) must be prefixed with dollar sign ($isDragging), otherwise they'll be passed to React, which doesn't like DOM elements having props and will give an error.
(This has to do with styled-components, rather than dnd, though I ran into it while following the tutorial for dnd, which uses styled-components, so it's worth mentioning too.)
I suggest creating such a page in the docs with the latest errata for this tutorial and linking to it above/below the link to the tutorial.
The text was updated successfully, but these errors were encountered:
The tutorial is a bit out of date, and there's a few small changes that need to be made for it to work.
One is that innerRef is changed to ref.
Another is that props passed to styled-components (e.g. isDragging) must be prefixed with dollar sign ($isDragging), otherwise they'll be passed to React, which doesn't like DOM elements having props and will give an error.
(This has to do with styled-components, rather than dnd, though I ran into it while following the tutorial for dnd, which uses styled-components, so it's worth mentioning too.)
I suggest creating such a page in the docs with the latest errata for this tutorial and linking to it above/below the link to the tutorial.
The text was updated successfully, but these errors were encountered: