원문 https://react-dnd.github.io/react-dnd/docs/tutorial
마이크로소프트 엔지니어의 컴포넌트 아키텍처 설계 프로세스가 드러나는 읽을만한 글이라 정리해둔다
들어가기에 앞서 : React DnD의 Concept
아이템과 타입
- Item(아이템) : 진실의 소스는 데이터다
- DOM이나 컴포넌트가 아니라 아이템(데이터-자바스크립트 객체)가 드래그된다.
- 카드 : { cardId: 42 ,type:'card'}
- 체스 : { fromCell: 'C5', piece: 'queen' , type:"piece"}
- type(타입)
- 객체지향의 클래스와 비슷한 의미를 갖는다.
- 타입 간의 상호작용을 정의한다.
모니터(collect 함수)
- 드래그 앤 드롭은 기본적으로 stateful하다
- 드래그 작업이 진행 중이거나 아니다.
- 아이템과 타입이 있거나 없다.
- 드래그 혹은 드랍 할 수 있다 없다.
모니터 객체는 React DnD의 해당 상태를 컴포넌트에 노출하기 위한 수단이다.
모니터 객체를 collect 함수로 감싸, 하이레벨 상태를 컴포넌트에 노출할 수 있다.
piece를 드래그 할 때 Chess cell을 강조하고 싶다.
Cell 컴포넌트에서 collect 함수를 다음과 같이 정의하여 사용한다.
function collect(monitor) {
return {
highlighted: monitor.canDrop(),
hovered: monitor.isOver()
}
}
이제 Cell 컴포넌트에서 highlighted, hovered 속성을 사용할 수 있다.
커넥터
훅으로 대체되어 생략
드래그 소스 & 드랍 타겟
백엔드
React DnD 튜토리얼
- 드래그 소스와 드랍 타겟을 만들고
- React 컴포넌트와 연결하여
- 드래그 앤 드롭 이벤트에 대한 응답으로 UI를 변경하는 방법을 배웁니다.
완성할 작품
컴포넌트 식별
- Knight, our lonely knight piece;
- Square, a single square on the board;
- Board, the whole board with 64 squares.
프롭스 설계 : 렌더링에 필요한 데이터 구조?
현재 좌표 상태는 어디에다 둘까요?
보드에는 두지 않겠습니다. 컴포넌트 내부 상태는 적을수록 좋습니다.
보드는 이미 레이아웃 로직을 갖고 있습니다.
상태관리 로직은 분리하고 싶습니다.
컴포넌트 만들기
import React from 'react'
export default function Knight() {
return <span>♘</span>
}
렌더링이 잘 되나 봅시다.
import React from 'react'
import ReactDOM from 'react-dom'
import Knight from './Knight'
ReactDOM.render(<Knight />, document.getElementById('root'))
import React from 'react'
export default function Square({ black }) {
const fill = black ? 'black' : 'white'
return <div style={{ backgroundColor: fill }} />
}
import React from 'react'
import ReactDOM from 'react-dom'
import Knight from './Knight'
import Square from './Square'
ReactDOM.render(
<Square black>
<Knight />
</Square>,
document.getElementById('root')
)
- Square에 차원을 지정하는 것을 잊었으므로 그냥 축소됩니다.
- 너비: '100%' 및 높이: '100%'를 지정하여 컨테이너를 채웁니다.
- Square 컴포넌트 내부에 {children}을 넣는 것을 잊었습니다.
import React from 'react'
export default function Square({ black, children }) {
const fill = black ? 'black' : 'white'
const stroke = black ? 'white' : 'black'
return (
<div
style={{
backgroundColor: fill,
color: stroke,
width: '100%',
height: '100%'
}}
>
{children}
</div>
)
}
import React from 'react'
import Square from './Square'
import Knight from './Knight'
export default function Board() {
return (
<div>
<Square black>
<Knight />
</Square>
</div>
)
}
import React from 'react'
import ReactDOM from 'react-dom'
import Board from './Board'
ReactDOM.render(
<Board knightPosition={[0, 0]} />,
document.getElementById('root')
)
동일한 단일 사각형을 볼 수 있습니다.
이제 모든 사각형을 렌더링할 것입니다!
하지만 어디서부터 시작해야 할지 모르겠어요.
어떤 것을 렌더링 할까요? forloop? 사각형에 대한 map?
function renderSquare(x, y, [knightX, knightY]) {
const black = (x + y) % 2 === 1
const isKnightHere = knightX === x && knightY === y
const piece = isKnightHere ? <Knight /> : null
return <Square black={black}>{piece}</Square>
}
export default function Board({ knightPosition }) {
return (
<div
style={{
width: '100%',
height: '100%'
}}
>
{renderSquare(0, 0, knightPosition)}
{renderSquare(1, 0, knightPosition)}
{renderSquare(2, 0, knightPosition)}
</div>
)
}
이전에 square의 width, height를 100%로 설정하였던 것을 깜빡하였습니다.
이제 Flexbox를 도입해 봅시다.
import React from 'react'
import Square from './Square'
import Knight from './Knight'
function renderSquare(i, [knightX, knightY]) {
const x = i % 8
const y = Math.floor(i / 8)
const isKnightHere = x === knightX && y === knightY
const black = (x + y) % 2 === 1
const piece = isKnightHere ? <Knight /> : null
return (
<div key={i} style={{ width: '12.5%', height: '12.5%' }}>
<Square black={black}>{piece}</Square>
</div>
)
}
export default function Board({ knightPosition }) {
const squares = []
for (let i = 0; i < 64; i++) {
squares.push(renderSquare(i, knightPosition))
}
return (
<div
style={{
width: '100%',
height: '100%',
display: 'flex',
flexWrap: 'wrap'
}}
>
{squares}
</div>
)
}
Board의 종횡비를 제한하는 방법을 아직 모르더라도 나중에 추가하기 쉬울 것입니다.
import React from 'react'
import ReactDOM from 'react-dom'
import Board from './Board'
ReactDOM.render(
<Board knightPosition={[7, 4]} />,
document.getElementById('root')
)
이 환상적인 선언형 스타일이 사람들이 리액트를 사랑하는 이유입니다.
게임 상태 추가하기
이제 Knight를 드래그 가능하도록 만들고 싶습니다.
현재 기사 위치를 일종의 상태 저장소에 유지하고 변경할 수 있는 방법이 필요합니다.
React는 상태 관리나 데이터 흐름에 대해 독단적이지 않습니다.
Flux, Redux, Rx 또는 심지어 Backbone을 사용할 수도 있고
뚱뚱한 모델을 피하고 읽기와 쓰기를 분리할 수 있습니다.
(avoid fat models and separate your reads from writes)
나는 이 간단한 예제를 위해 Redux를 설치하거나 설정하는 것을 귀찮게 하고 싶지 않으므로 더 간단한 패턴을 따를 것입니다.
Redux만큼의 확장성은 없으나, 필요하지도 않습니다.
아직 상태 관리자용 API를 결정하지 않았지만 Game이라고 부를 예정이며
데이터 변경 사항을 내 React 코드에 신호로 보내는 방법이 확실히 필요합니다.
아직 존재하지 않는 가상의 Game으로 index.js를 다시 작성할 수 있습니다.
이번에는 상상으로 코드를 작성하고 있으며 아직 실행할 수 없습니다. 아직 API를 파악하고 있기 때문입니다.
import React from 'react'
import ReactDOM from 'react-dom'
import Board from './Board'
import { observe } from './Game'
const root = document.getElementById('root')
observe((knightPosition) =>
ReactDOM.render(<Board knightPosition={knightPosition} />, root)
)
export function observe(receive) {
const randPos = () => Math.floor(Math.random() * 8)
setInterval(() => receive([randPos(), randPos()]), 500)
}
let knightPosition = [0, 0]
let observer = null
// 변경 발생 시마다 observer를 호출함
function emitChange() {
observer(knightPosition)
}
export function observe(o) {
if (observer) {
throw new Error('Multiple observers not implemented.')
}
observer = o
emitChange()
}
export function moveKnight(toX, toY) {
knightPosition = [toX, toY]
emitChange()
}
컴포넌트는 오직 렌더링을 위한 데이터만 필요로 합니다.
import React from 'react'
import Square from './Square'
import Knight from './Knight'
import { moveKnight } from './Game'
/* ... */
function renderSquare(i, knightPosition) {
/* ... */
return <div onClick={() => handleSquareClick(x, y)}>{/* ... */}</div>
}
function handleSquareClick(toX, toY) {
moveKnight(toX, toY)
}
Square에 onClickprop을 추가하고 대신 사용할 수도 있었지만
나중에 드래그 앤 드롭 인터페이스를 위해 클릭 핸들러를 제거할 것이기 때문에 귀찮게 할 필요가 없습니다.
let knightPosition = [1, 7] // B1
/* ... */
export function canMoveKnight(toX, toY) {
const [x, y] = knightPosition
const dx = toX - x
const dy = toY - y
return (
(Math.abs(dx) === 2 && Math.abs(dy) === 1) ||
(Math.abs(dx) === 1 && Math.abs(dy) === 2)
)
}
마지막으로 handleSquareClick 메서드에 canMoveKnightcheck를 추가합니다.
import { canMoveKnight, moveKnight } from './Game'
/* ... */
function handleSquareClick(toX, toY) {
if (canMoveKnight(toX, toY)) {
moveKnight(toX, toY)
}
}
Adding Drag and Drop Interaction
npm install react-dnd react-dnd-html5-backend
Setting up the Drag and Drop Context
앱에서 가장 먼저 설정해야 할 것은 DndProvider입니다.
이것은 우리 애플리케이션의 최상단 근처에 장착되어야 합니다.
HTML5Backend를 사용할 것임을 설정하려면 이것이 필요합니다.
import React from 'react'
import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'
function Board() {
/* ... */
return <DndProvider backend={HTML5Backend}>...</DndProvider>
}
Define Drag Types
export const ItemTypes = {
KNIGHT: 'knight'
}
Knight를 드래그 가능하도록 만들기
const [{ isDragging }, drag] = useDrag(() => ({
type: ItemTypes.KNIGHT,
collect: (monitor) => ({
isDragging: !!monitor.isDragging()
})
}))
- useDrag는 사양 개체를 허용합니다. item.type property는 필수이며 드래그되는 아이템의 타입을 지정합니다.
- 드래그되는 조각의 종류를 식별하기 위해 여기에 추가 정보를 첨부할 수도 있지만 이것은 토이 응용 프로그램이므로 타입만 정의하면 됩니다.
- collect는 collect 함수를 정의합니다.
- 드래그 앤 드롭 상태를 컴포넌트에 사용할 수 있는 prop (props 객체)로 변환하는 방법입니다.
- result 배열에는 다음이 포함됩니다.
- 첫 번째 항목인 props object : 드래그 앤 드롭 시스템에서 수집한 props 객체가 포함됩니다.
- 두 번째 항목 ref 함수.
- 이것은 DOM 요소를 react-dnd에 부착하는데 사용됩니다.
이제 드래그 기능이 업데이트 된 Knight 컴포넌트를 살펴봅시다.
import React from 'react'
import { ItemTypes } from './Constants'
import { useDrag } from 'react-dnd'
function Knight() {
const [{isDragging}, drag] = useDrag(() => ({
type: ItemTypes.KNIGHT,
collect: monitor => ({
isDragging: !!monitor.isDragging(),
}),
}))
return (
<div
ref={drag}
style={{
opacity: isDragging ? 0.5 : 1,
fontSize: 25,
fontWeight: 'bold',
cursor: 'move',
}}
>
♘
</div>,
)
}
export default Knight
Board 사각형(Squares)을 Droppable(드래그 아이템을 놓을 수 있는 위치)로 만들기
이제 Square를 드롭 타겟으로 만들 것입니다.
이번에는 Square로 포지션을 넘길 수 밖에 없습니다.
Square가 자신의 위치를 모르면 드래그한 Knight를 자기 위에 두어야 하는지 알 수 있을까요?
하지만 Square의 엔터티 자체가 변한게 아니라, 보드에서 말과의 인터랙션 관점의 역할이 추가된 것으로 볼 수도 있습니다.
즉 다른 곳에서의 Square의 사용성 측면을 고려하면 position이 필요하지 않습니다.
이 딜레마에 직면했을 때 똑똑한 컴포넌트와 멍청한 컴포넌트(smart and dumb components)를 분리할 때입니다.
import React from 'react'
import Square from './Square'
export default function BoardSquare({ x, y, children }) {
const black = (x + y) % 2 === 1
return <Square black={black}>{children}</Square>
}
/* ... */
import BoardSquare from './BoardSquare'
function renderSquare(i, knightPosition) {
const x = i % 8
const y = Math.floor(i / 8)
return (
<div key={i} style={{ width: '12.5%', height: '12.5%' }}>
<BoardSquare x={x} y={y}>
{renderPiece(x, y, knightPosition)}
</BoardSquare>
</div>
)
}
function renderPiece(x, y, [knightX, knightY]) {
if (x === knightX && y === knightY) {
return <Knight />
}
}
const [, drop] = useDrop(
() => ({
accept: ItemTypes.KNIGHT,
drop: () => moveKnight(x, y)
}),
[x, y]
)
const [{ isOver }, drop] = useDrop(
() => ({
accept: ItemTypes.KNIGHT,
drop: () => moveKnight(x, y),
collect: (monitor) => ({
isOver: !!monitor.isOver()
})
}),
[x, y]
)
import React from 'react'
import Square from './Square'
import { canMoveKnight, moveKnight } from './Game'
import { ItemTypes } from './Constants'
import { useDrop } from 'react-dnd'
function BoardSquare({ x, y, children }) {
const black = (x + y) % 2 === 1
const [{ isOver }, drop] = useDrop(() => ({
accept: ItemTypes.KNIGHT,
drop: () => moveKnight(x, y),
collect: monitor => ({
isOver: !!monitor.isOver(),
}),
}), [x, y])
return (
<div
ref={drop}
style={{
position: 'relative',
width: '100%',
height: '100%',
}}
>
<Square black={black}>{children}</Square>
{isOver && (
<div
style={{
position: 'absolute',
top: 0,
left: 0,
height: '100%',
width: '100%',
zIndex: 1,
opacity: 0.5,
backgroundColor: 'yellow',
}}
/>
)}
</div>,
)
}
export default BoardSquare
고맙게도 React DnD를 사용하면 정말 쉽습니다.
드랍 타겟 사양 객체에서 canDrop method를 정의하기만 하면 됩니다.
const [{ isOver, canDrop }, drop] = useDrop(
() => ({
accept: ItemTypes.KNIGHT,
canDrop: () => canMoveKnight(x, y),
drop: () => moveKnight(x, y),
collect: (monitor) => ({
isOver: !!monitor.isOver(),
canDrop: !!monitor.canDrop()
})
}),
[x, y]
)
또한 collect 함수의 canDrop 속성을 이용해 오버레이를 추가합니다.
import React from 'react'
import Square from './Square'
import { canMoveKnight, moveKnight } from './Game'
import { ItemTypes } from './Constants'
import { useDrop } from 'react-dnd'
function BoardSquare({ x, y, children }) {
const black = (x + y) % 2 === 1
const [{ isOver, canDrop }, drop] = useDrop(
() => ({
accept: ItemTypes.KNIGHT,
drop: () => moveKnight(x, y),
canDrop: () => canMoveKnight(x, y),
collect: (monitor) => ({
isOver: !!monitor.isOver(),
canDrop: !!monitor.canDrop()
})
}),
[x, y]
)
return (
<div
ref={drop}
style={{
position: 'relative',
width: '100%',
height: '100%'
}}
>
<Square black={black}>{children}</Square>
{isOver && !canDrop && <Overlay color="red" />}
{!isOver && canDrop && <Overlay color="yellow" />}
{isOver && canDrop && <Overlay color="green" />}
</div>
)
}
export default BoardSquare
드래그 프리뷰 이미지 추가하기
마지막으로 보여드리고 싶은 것은 드래그 미리보기 이미지를 커스터마이징 하는 것입니다.
물론 브라우저는 DOM 노드의 스크린샷을 찍을 것이지만 사용자 정의 이미지를 표시하려면 어떻게 해야 할까요?
const [{ isDragging }, drag, preview] = useDrag(() => ({
type: ItemTypes.KNIGHT,
collect: (monitor) => ({
isDragging: !!monitor.isDragging()
})
}))
const knightImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4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33gY3dTzlnOOIaXC/LX1WrouOBxSOTaIJw4CcTe/bLb0TGKKVoo4DR/gyq/gK3p3zNFmR3GxRdol6ZZDb7R+uiCXkzgiyw9QTXSNctrPRVryVY3Pjimsl1YsLw1mq6MROIdbEtMVJSt6q9DYHGRIhn5B1P0KUH3p+vTU/1VjyMPLxz///ZxjSCU3/QZfrYC1oMyKo9bDq6tdBNRATZVk3WfMl7pAtIhwGtosgjVCUAjOetVOpANQu0Fw1jnCa5tjoo5Ds2RyOJfMnXyN+Kfvy/vq+goQ1A5UVccJxztz5M4hLWWbM58EC9yXADe1xBJrEIFRIKN2IpNZqfIzGOXZL9bru5mU5goAtu9cvs3q79z2Q1/Dg/nK2dmbPVBc6biY4UjqCC8SQyhCS4WZetDldxEBEkAwmRnlDfIXClMbjrnxLicspomckmvlGUKEBVSqvYeSL7VyfXbnYxcRWsGCtEomaNmHadCqWPodC+vln6ilwRRpFvvw0ugsfru4wRh/pqU4ceB/fcexz644pxiSSo23VQqLSKy8o/qj6OqQJvCgTgmcGZF5abykGWJaQ5IbDFlmQsO5K+ISXNJw9lr3XGbou5NuziPNkHaJIVqUKCp/cXMC873BKEEyIq7MptvNfV7+4nyQNIVf+vHouOQsMATQDJNXY7BSlUgxGORZagu/WZh96JWNM/z/f7+ryeKCEqHlZfmz3p//WVddXq93fV9et/xZIvn8z1r3nFeZ+wj6ElN7bqtV58GGCHdduw2OUeEjUi0CYF3cwjOzTn5C62VK5GyX1+ldu7k/vDcop/1ETPmlxvHap0FY9wud7KYu+EZuA4aFZsSZTFPXFaOkQe4cEg7XRKcb0rm4Gf7rKo4hir5w6ormpEgNpJhduB115gsgNcDNcnH4S6XsyV8Kxgb/iXMQSjaW/wcaEsvGjOMXYgAAAABJRU5ErkJggg==';
render() {
return (
<>
<DragPreviewImage connect={preview} src={knightImage} />
<div
ref={drag}
style={{
...knightStyle,
opacity: isDragging ? 0.5 : 1,
}}
>
♘
</div>
</>
)
}
}
결론
이 튜토리얼의 목표는 React DnD가 React의 철학에 아주 잘 맞는다는 것과
복잡한 상호 작용을 구현하기 전에 먼저 앱 아키텍처에 대해 생각해야 한다는 것을 보여주는 것입니다.
'FrontEnd' 카테고리의 다른 글
[Next.js 튜토리얼] JS에서 리액트로 (0) | 2022.07.01 |
---|---|
웹 애플리케이션을 구성하는 요소들 (0) | 2022.07.01 |
CSS : Flex와 min-width (0) | 2022.06.30 |
zustand와 타입스크립트 [공식문서번역] (0) | 2022.06.29 |
React-Hook-Forms로 재사용 가능한 폼 만들기 (0) | 2022.06.28 |