1.3.9 • Published 4 years ago
@ehne/preact-slotx v1.3.9
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