From bb54686d64b25fb6de529fec92d9f3f842e4a346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marian=20=C5=A0=C3=A1mal?= Date: Sun, 4 Jun 2023 00:50:54 +0200 Subject: [PATCH] readme fucker --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index b1a513f..7f4d424 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,16 @@ GJP Cup was so great that there is GJP Cup 2 now 2. Download PocketBase from https://pocketbase.io/docs/, extract it, put the binary to this directory (or somewhere else idc) 3. `./pocketbase serve` in one terminal 4. `npm run dev` in second terminal + +# Good to know +## Custom `pocketbase-react` +We're using our own distribution of `pocketbase-react` (available at https://github.com/radeksoft/pocketbase-react/tree/radeksoft), installed in the `package.json` as a Github repo. The installation should still be as simple as `npm install`. + +**Differences with upstream:** +- login with admin account +- working initialCollections (fetch & subscribe by itself) +- no React Native support (200 megs of node_modules less) + +**Caveats:** +- importing by `import { ... } from 'pocketbase-react/src';` because we can't import the package (by it's `package.json`), but we're loading the source code directly +- React StrictMode is disabled, because `pocketbase-react` is not good at unsubscribing on component unmount (caused double entries on realtime updates)