0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

react-dndのimportで起こった事

Last updated at Posted at 2020-12-06

react-dndのimport時にエラーが出た

「react-dnd」を利用してサンプルを作ろうと思った時に「import」でエラーが出たので対処方を書こうと思います。
大したものではないです。

import { DragDropContext } from 'react-dnd'がない

import { DragDropContext } from "react-dnd"

DragDropContextが見つからないと言われてしまいます。
最新ではこれが変わっていて…

import { DndProvider } from 'react-dnd';

になっています。

import ReactDnDHTML5Backend from 'react-dnd-html5-backend'がない

import ReactDnDHTML5Backend from "react-dnd-html5-backend"

ReactDnDHTML5Backendが見つからないと言われてしまいます。
最新ではこれが変わっていて…

import { HTML5Backend } from 'react-dnd-html5-backend';

になっています。


調べても意外とスンナリ見つからなかったので、参考になれば嬉しいです。
ありがとうございました。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?