This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useCallback, useRef } from "react"; | |
import { DndProvider, useDrag, useDrop } from "react-dnd"; | |
import HTML5Backend from "react-dnd-html5-backend"; | |
import update from "immutability-helper"; | |
const tasksList = [ | |
{ _id: 1, title: "First Task", status: "backlog" }, | |
{ _id: 2, title: "Second Task", status: "backlog" }, | |
{ _id: 3, title: "Third Task", status: "backlog" }, | |
{ _id: 4, title: "Fourth Task", status: "new" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title></title> | |
<style> | |
#inputArr{ | |
width: 300px; | |
height: 200px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title></title> | |
<style> | |
#inputArr{ | |
width: 300px; | |
height: 200px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { DragDropContext, DropTarget, DragSource } from "react-dnd"; | |
import HTML5Backend from "react-dnd-html5-backend"; | |
import update from "immutability-helper"; | |
const tasks = [ | |
{ _id: 1, title: "First Task", status: "backlog" }, | |
{ _id: 2, title: "Second Task", status: "backlog" }, | |
{ _id: 3, title: "Third Task", status: "backlog" }, | |
{ _id: 4, title: "Fourth Task", status: "new" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>SPA - demo</title> | |
<style> | |
.page { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const Child = props => ( | |
<div | |
style={{ | |
width: 300, | |
height: 100, | |
backgroundColor: '#bbb', | |
border: '1px solid gray', | |
}} |