Skip to content

Releases: bfanger/svelte-preprocess-react

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