Releases: bfanger/svelte-preprocess-react
Releases · bfanger/svelte-preprocess-react
2.0.5
2.0.4
hooks()
now has the same "rune" treatment as sveltify()
- Use hooks without importing, preprocessor will inject the import statement.
- Use hooks without providing ReactDOM and renderToString, preprocessor will inject the imports and the dependencies parameter.
Upgrade:
// ❌ Old
import { hooks } from "svelte-preprocess-react";
const store = hooks(() => useSomeHook(), ReactDOM, renderToString)
// ✅ New
const store = hooks(() => useSomeHook())
2.0.3
2.0.3
- Improved typing of the children prop of Sveltified components.
2.0.2
- When children is passed as attribute, this is renamed to react$children during preprocessing and is passed as-is to the React component, allowing for renderProps, (but you can't use Reactified Svelte components as that affects the children prop)
2.0.1
- Don't fail when subcomponents(children) are not rendered, a parent component like
<Suspense>
can decide not to render.
2.0.0
1.0.0
0.17.0
0.16.0
- Upgraded to Svelte v4
- Upgraded to @svelte/package v2 and applied stricter imports/exports
- Previously both:
import sveltify from "svelte-preprocess-react/sveltify";
import { sveltify } from "svelte-preprocess-react";
- were supported, now only
import { sveltify } from "svelte-preprocess-react";
is supported.
- Switched from TS to JSDoc types for the preprocessor, simplifying the development setup.