minor changes
This commit is contained in:
@@ -1,5 +1,18 @@
|
|||||||
# SolidJS tRPC
|
# 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
|
## 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:
|
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<IHomeProps> = ({}) => {
|
|||||||
|
|
||||||
export default Home;
|
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", {...}]))
|
|
||||||
```
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "solid-trpc",
|
"name": "solid-trpc",
|
||||||
"version": "0.0.4",
|
"version": "0.0.5",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "solid-trpc",
|
"name": "solid-trpc",
|
||||||
"version": "0.0.4",
|
"version": "0.0.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.18.13",
|
"@babel/core": "^7.18.13",
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"description": "SolidJS tRPC",
|
"description": "SolidJS tRPC",
|
||||||
"author": "OrJDev",
|
"author": "OrJDev",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.0.4",
|
"version": "0.0.5",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import babel from "@rollup/plugin-babel";
|
|||||||
import nodeResolve from "@rollup/plugin-node-resolve";
|
import nodeResolve from "@rollup/plugin-node-resolve";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: "src/index.ts",
|
input: "src/index.tsx",
|
||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
file: "dist/index.js",
|
file: "dist/index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user