Farfetched and Solid
Integration is distributed as a separate package, you have to install it and its peer dependency before usage:
sh
pnpm install @farfetched/solid effector-solidsh
yarn add @farfetched/solid effector-solidsh
npm install @farfetched/solid effector-solidShowcases
createQueryResource
It is analogue of SoildJS createResource, but uses Query as a source and fetcher.
tsx
import { createQueryResource } from '@farfetched/solid';
function UserProfile() {
const [user] = createQueryResource(userQuery);
return (
<Suspense fallback={<p>Loading...</p>}>
<ErrorBoundary fallback={<p>User could not be shown</p>}>
<section>
<p>{user()?.name}</p>
<p>{user()?.email}</p>
</section>
</ErrorBoundary>
</Suspense>
);
}