Difference between `effect` and `createEffect`

I notice the docs recommend createEffect for effects from solid-js But effect also exists as an import from solid-js/web What is the difference between them?
1 Reply
Erik Demaine
Erik Demaine2w ago
I'd need to check, but I believe they are identical (at least in spirit). effect is the name that dom-expressions uses for a generic effect, so you'll see it in generated code, say in the playground. This is a layer of abstraction so that dom-expressions can run on several runtimes. On Solid, it's implemented via createEffect (I believe it's just an alias). So... Use createEffect. effect is just for a layer of abstraction that you need not care about.
Want results from more Discord servers?
Add your server