preact-markup
preact-markup copied to clipboard
:zap: Render HTML5 as VDOM, with Components as Custom Elements!
> error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
Fix for issue #25: change the `shouldComponentUpdate` function to allow re-rendering when the `components` prop changes.
This might not be directly an issue, but I'm looking for some advice. I'm trying to use this package (`[email protected]`) in a Next.js codebase set up with `preact/compat` as detailed...
`Text.data` is faster: https://esbench.com/bench/590c9cfe99634800a0347ffc
Hi I am trying to use the Markup component while rendering server side with preact-render-to-string. I get the following error: 'ReferenceError: document is not defined' Could you suggest a work...
Added `jsdom` as a dependency. In parser-markup.js, `document` is accessed to create a frame to render HTML in. Since `document` doesn't exist in Node, this causes SSR builds to throw...
Potentially fixes #6. See discussion in https://github.com/developit/preact-markup/pull/18. This approach adds a `parser` property, which enables you to use the parser of your choice, when server-side-rendering. > `parser` – With this...
When using this library with preact-cli we get build error when prerendering because it expects `document` to not be undefined. The fallback here is to use dangerouslySetInnerHTML with the supplied...
Added two new props to provide better control over the rendered wrapper element. `as` (default: 'div') will accept a component or a string to set the wrapping element `markdownClass` (default:...
When using the option to add a map of custom elements the component will not update if said mapping changes. I think the problem might be here: https://github.com/developit/preact-markup/blob/034c4c6e13029d94db57c8a565191a03b214eb83/src/index.js#L11-L14 Now I...