Skip to content

Instantly share code, notes, and snippets.

@r-Larch
r-Larch / Example.tsx
Last active April 7, 2025 06:43
Creating a clean sortable list in solidjs using <SortableFor/>
import { createResource } from "solid-js";
import { HiOutlineChatBubbleLeftRight } from "solid-icons/hi";
import { sort, SortableFor, SortEvent } from "./_SortableFor";
export function ChatflowList() {
const [list, actions] = createResource(fetchList)
function handleSort(e: SortEvent) {
actions.mutate(sort(e))