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