Skip to content

Releases: bfanger/svelte-preprocess-react

2.0.5

21 Nov 21:35
Compare
Choose a tag to compare
  • Support for <react.Component.Item /> #46
  • Automatic injection of components to sveltify(...)
    • <react.div> now works without adding div:"div" to sveltify().
  • Support for {...rest} props #48
  • fix: Improved nesting in SSR
  • fix: Support prettier formatted closing tags

2.0.4

10 Nov 16:47
Compare
Choose a tag to compare

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

02 Nov 14:33
Compare
Choose a tag to compare

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

20 Oct 15:04
Compare
Choose a tag to compare
  • Compatible with Svelte 5
  • New syntax: <react.Component>
  • Typesafety & other tooling support.
  • New sveltify() api
  • Deprecated used()

1.0.0

20 Oct 08:57
Compare
Choose a tag to compare
  • No changes, 1.x.x versions are compatible with Svelte 4

0.17.0

07 Feb 09:14
Compare
Choose a tag to compare
  • Locked peerDependency Svelte to v4 (For Svelte v5 try the 2.x beta )
  • Event forwarding #17
  • Upgraded development environment to SvelteKit 2

0.16.0

28 Jul 10:20
Compare
Choose a tag to compare
  • 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.

0.15.0

27 Apr 09:31
Compare
Choose a tag to compare
  • Examples now use @sveltejs/vite-plugin-svelte vitePreprocess instead of svelte-preprocess
  • Added input example
  • Added support for childless components, such as <react:input /> #25

0.14.0

09 Dec 14:09
Compare
Choose a tag to compare

#20 fix react key warning when using hooks

0.13.0

05 Dec 21:32
Compare
Choose a tag to compare
  • #18 Fix: Using <react:Component />in AST branches like inside {:else}, {:catch} block
  • Improved SSR (Slots & Cross framework contexts)
  • A number of router-router shims to use let React components to use the sveltekit router using react-router like api's.