-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.js
35 lines (30 loc) · 1.25 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React, { useEffect } from "react";
import { GridStack } from 'gridstack';
import 'gridstack/dist/gridstack.css';
import "./App.css";
function App() {
// _________________________________________________
// Initialize Gridstack inside useEffect so that DOM is rendered when its initialized
// _________________________________________________
useEffect(() => {
var grid = GridStack.init();
});
// _________________________________________________
// _________________________________________________
return (
<div className="App">
<div className="grid-stack">
<div className="grid-stack-item border-dark" data-gs-width="4" data-gs-height="4">
<div className="grid-stack-item-content">Item 1</div>
</div>
<div className="grid-stack-item border-dark" data-gs-width="4" data-gs-height="4">
<div className="grid-stack-item-content">Item 2</div>
</div>
<div className="grid-stack-item border-dark" data-gs-width="4" data-gs-height="4">
<div className="grid-stack-item-content">Item 3</div>
</div>
</div>
</div>
);
}
export default App;