Skip to content

Commit 61e248e

Browse files
committed
chore: fix hotloading of demo
1 parent 11afaee commit 61e248e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/basic-example/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import SortableTree, { toggleExpandedForAll } from '../../src/index';
2+
import { SortableTreeWithoutDndContext as SortableTree, toggleExpandedForAll } from '../../src/index';
33
import styles from './stylesheets/app.scss';
44
import '../shared/favicon/apple-touch-icon.png';
55
import '../shared/favicon/favicon-16x16.png';

examples/basic-example/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import { AppContainer } from 'react-hot-loader'; // eslint-disable-line import/no-extraneous-dependencies
4+
import { DragDropContext as dragDropContext } from 'react-dnd';
5+
import HTML5Backend from 'react-dnd-html5-backend';
46

57
const rootEl = document.getElementById('app');
68
const render = Component => {
9+
const wrap = dragDropContext(HTML5Backend);
10+
const Wrapped = wrap(Component);
711
ReactDOM.render(
812
<AppContainer>
9-
<Component />
13+
<Wrapped />
1014
</AppContainer>,
1115
rootEl
1216
);

0 commit comments

Comments
 (0)