@ehne/preact-slotx

1.3.9 • Public • Published

logo

Welcome to Preact Slot X 👋

Version Size

basically just reimplements preact-slots, for Preact X

import { SlotProvider, Slot, SlotContent } from '@ehne/preact-slotx'
 
render(
    <SlotProvider>
        <Slot name="foo">
            Some Fallback Content
        </Slot>
        <SlotContent name="foo">
            Replacement Content
        </SlotContent>
    </SlotProvider>
)

requires htm and preact

installing:

through npm:

$ npm install @ehne/preact-slotx

by copying and pasting:

  • just copy the file in src/index.js into your code somewhere.
  • remove exports from the functions if you aren't keeping preact slot x as a seperate file.

made by darcy lugt-falk

logo background image: galaxy effect png 3

Readme

Keywords

Package Sidebar

Install

npm i @ehne/preact-slotx

Weekly Downloads

1

Version

1.3.9

License

MIT

Unpacked Size

3.19 MB

Total Files

17

Last publish

Collaborators

  • ehne