From 2ee53b43b29d8daf84bfb39508dbcec59a2f152e Mon Sep 17 00:00:00 2001 From: OrJDev Date: Tue, 27 Sep 2022 14:47:51 +0300 Subject: [PATCH] minor changes --- README.MD | 27 +++++++++++++-------------- package-lock.json | 4 ++-- package.json | 2 +- rollup.config.js | 2 +- src/{index.ts => index.tsx} | 0 5 files changed, 17 insertions(+), 18 deletions(-) rename src/{index.ts => index.tsx} (100%) diff --git a/README.MD b/README.MD index 4357fe1..b93f830 100644 --- a/README.MD +++ b/README.MD @@ -1,5 +1,18 @@ # SolidJS tRPC +## What is different + +- Replace "use" with "create" (e.g. useQuery -> createQuery) +- Query paths (key and input) are being treated as Solid Accessor (callback): + +```ts +// instead of a string: +useQuery(["MyKey", {...}]) + +// it becomes a callback: +createQuery(()=> ["MyKey", {...}]) +``` + ## Getting Started I recommend using [Create JD App](https://github.com/OrJDev/create-jd-app) but if you want to create a project from scratch, you can follow the steps below: @@ -94,17 +107,3 @@ const Home: Component = ({}) => { export default Home; ``` - -## What is different - -- No SSR -- Replace "use" with "create" (e.g. useQuery -> createQuery) -- Query paths (key and input) are being treated as Solid Accessor (callback): - -```ts -// instead of a string: -useQuery(["MyKey", {...}] - -// it becomes a callback: -createQuery(()=> ["MyKey", {...}])) -``` diff --git a/package-lock.json b/package-lock.json index 85406c1..484b118 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "solid-trpc", - "version": "0.0.4", + "version": "0.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "solid-trpc", - "version": "0.0.4", + "version": "0.0.5", "license": "MIT", "devDependencies": { "@babel/core": "^7.18.13", diff --git a/package.json b/package.json index f16fe3d..26c07df 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "SolidJS tRPC", "author": "OrJDev", "license": "MIT", - "version": "0.0.4", + "version": "0.0.5", "publishConfig": { "access": "public" }, diff --git a/rollup.config.js b/rollup.config.js index a5bce94..ce2a2af 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,7 +2,7 @@ import babel from "@rollup/plugin-babel"; import nodeResolve from "@rollup/plugin-node-resolve"; export default { - input: "src/index.ts", + input: "src/index.tsx", output: [ { file: "dist/index.js", diff --git a/src/index.ts b/src/index.tsx similarity index 100% rename from src/index.ts rename to src/index.tsx