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

allows you to use multiple React DnD backends simultaneously (e.g. HTML5 and touch)

Notifications You must be signed in to change notification settings

jcoreio/react-dnd-multi-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 {
  ...
}

About

allows you to use multiple React DnD backends simultaneously (e.g. HTML5 and touch)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published