Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Latest commit

 

History

History
24 lines (18 loc) · 723 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 723 Bytes

react-dnd-multi-backend

Laptops with touchscreens exist, so it's nice to be able to support both mouse and touch interaction on such devices, instead of just one or the other. This enables you to support both mouse and touch interaction with React DnD.

Usage

Simply pass the desired backends as arguments to MultiBackend.

Example

import React, {Component} from 'react';
import MultiBackend from 'react-dnd-multi-backend';
import HTML5Backend from 'react-dnd/modules/backends/HTML5';
import TouchBackend from 'react-dnd-touch-backend';
import {DragDropContext} from 'react-dnd';

@DragDropContext(MultiBackend(HTML5Backend, TouchBackend))
export default class AppShell extends Component {
  ...
}