Skip to content

Releases: bfanger/svelte-preprocess-react

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.

0.12.0

21 Oct 14:03
Compare
Choose a tag to compare

Use import * as React from "react" notation, this works for both bundled and native loaders.
( import { useState } from "react" fails in certain conditions because react is not ESM)

0.11.0

24 Sep 12:15
Compare
Choose a tag to compare

Features

  • Added support for regular elements, to render a div via React:
    <react:div>A div</react:div>

Bugfixes

  • svelte components that use react:* without a script tag not longer result in Invalid Token

0.10.0

18 Sep 16:30
Compare
Choose a tag to compare

Breaking

After updating to 0.10.0 you'll be getting a TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".svelte" error when starting vite dev.

Update the import in your svelte.config.js, change:

import preprocessReact from "svelte-preprocess-react";

into

import preprocessReact from "svelte-preprocess-react/preprocessReact";

This change allows importing the utilities directly from svelte-preprocess-react, for example:

import { useStore } from "svelte-preprocess-react";
  • Renamed useReadable to useStore
  • Removed useWritable (a writable store already has a set function)

Features

  • Using dot notation. <react:Context.Provider {value} />
  • hooks. Using hooks inside Svelte files