Skip to content
The Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written) OpenAssistant Conversations (oasst2)

Can you please write me small code snippet for React functional component, that has two…

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    Can you please write me small code snippet for React functional component, that has two divs and each div have multiple items inside of them, source of items is an Array, also each item should be drag & drop between two divs ?

  2. Assistant

    import React, { useState } from 'react'; import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';

    const items = [ { id: 1, content: 'Item 1' }, { id: 2, content: 'Item 2' }, { id: 3, content: 'Item 3' }, { id: 4, content: 'Item 4' }, ];

    const DivWithItems = ({ items, onDrop, columnId }) => (

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.