Closed illiaChaban closed 4 months ago
Perhaps you want createEffect
?
or maybe import { type effect } from 'solid-js/web';
if you just want the type?
No, I just like the shorter name vs createEffect and noticed that it was available.
Yeah - a different (internal use) thing I think. Probably best to stick with createEffect
:)
Yeah this is internal used by the compiler and not intended for outside use. Under the hood it actually doesn't use createEffect
and uses createRenderEffect
. We need to export these helpers for the compiled output but the signature could be different and have different behavior.
Describe the bug
I'm using typescript and able to import "effect" from "solid-js/web"
If I use it in any way I get "The requested module 'solid-js/web' does not provide an export named 'effect'" error. Seems like types specify this export, but it doesn't actually exist
Types:
Your Example Website or App
https://stackblitz.com/edit/github-f45fb5-pkhx6p?file=src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
No error or no available export
Screenshots or Videos
Platform
Additional context
No response