A sample primitive that is made up for templating with the following options:
createArraySelcetor - Provides a getter and setter for the primitive.
npm install @solid-primitives/selectors
# or
yarn add @solid-primitives/selectors
# or
pnpm add @solid-primitives/selectorsconst list: string[] = ["apple", "pear", "orange"]
const [selectedItems] = createSignal<string[]>(["apple"])
const isSelected = createArraySelector(selectedItems)
<For each={list}>
{(item) => <li classList={{ active: isSelected(item) }}>{item}</li>}
</For>You can use this template for publishing your demo on CodeSandbox: https://codesandbox.io/s/solid-primitives-demo-template-sz95h
See CHANGELOG.md