Skip to content

Releases: bfanger/svelte-preprocess-react

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