Skip to content

2.0.4

Compare
Choose a tag to compare
@bfanger bfanger released this 10 Nov 16:47
· 10 commits to main since this release

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())