Skip to content

simplify stringification #41

@FND

Description

@FND

cf. a4afcf0

import { createElement } from "complate-stream";
import BufferedStream from "complate-stream/src/buffered-stream";

let stream = new BufferedStream();
let element = MyMacro();
element(stream, { nonBlocking: true }, () => {
    let html = stream.read();
    
});

this is a bit clunky and non-obvious, so we might simply provide a utility function to take care of all that:

stringify(MyMacro, params, ...children).
    then(html => );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions