MaveriX89
How to handle necessary async/await work inside of a createEffect?
Ah, I see, I’ll expand the code snippet. I should have been clearer. I already have a reference to the database locally. The createDocument hook is returned as part of an outer closure function that provides the database signal. So just assume the DB instance already exists
8 replies
Getting ReferenceError: React is not defined with Vitest + Solid Testing Library
@Alex Lohr I think that’s a great idea.
I think emphasizing that point of being able to rely on
createRoot
and linking to examples demonstrating that technique would be perfect. In my head, I had the impression that I needed to use the Solid Testing Library for anything and everything related to Solid26 replies
Getting ReferenceError: React is not defined with Vitest + Solid Testing Library
@Alex Lohr holy crapola! Wrapping with
createRoot
in test worked! So wait, is it safe to say there's no need to use renderHook
from @solidjs/testing-library
for hook libraries?26 replies
Need clarity on eslint(solid/reactivity) warning use-case
Ah, extracting it out into a local variable and injecting it into
refreshRows
is a genius move and fixes the warning! Thank you so much for this insight and context! Super helpful! I feel like this use-case should be documented in the docs for that eslint(solid-reactivity)
rule.5 replies