mithril-stream-standalone
Standalone package of mithril/stream for libraries and applications that use Mithril Stream without the rest of Mithril.
Rationale
When mithril/stream
is used in a React application, Mithril's types will conflict with React's. This package eliminates the need for Mithril's types to be installed, avoiding those conflicts.
The code in this package also does not assume window
to be present, making it suitable for SSR applications (for example created with SvelteKit).
Usage
Installation
npm install mithril-stream-standalone
Import
Change the regular import when using Mithril:
import Stream from 'mithril/stream';
to:
import Stream from "mithril-stream-standalone";
Source
This repo contains copies of Mithril code.
License
Mithril license