-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(recipes): add recipe for local first data using powersync #147
feat(recipes): add recipe for local first data using powersync #147
Conversation
f9508b2
to
924c550
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, nice job as it's a pretty large topic to cover!
Left some comments that can maybe help spruce a few things up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is as far as I made it today. I'll wrap the review up in the morning.
Appreciate the comments -- it's hard to keep everything consistent because I have a working app, and then make changes to make the writing simpler and it's hard to keep them both in sync. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the things that I ran into. This was a much better experience than the first run through. For some reason it isn't syncing through to Supabase so I'll have to check my configuration there. I can pull data from Supabase into PowerSync, but the application doesn't push anything.
I'm able to create things inside the application. It just stays locally.
|
||
```tsx | ||
import {Button, Icon, ListItem, Screen, Text, TextField} from "app/components" | ||
import {SignedInNavigatorProp} from "app/navigators" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import {SignedInNavigatorProp} from "app/navigators" | |
import {SignedInNavigatorScreenProps} from "app/navigators" |
Thanks for that @morganick -- integrated it all and made a few extra tweaks:
|
I think we're pretty close -- at least I feel good enough to share it with PowerSync now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my version, I'm still getting:
LOG PowerSync status changed {"connected": true, "dataFlow": {"downloading": false, "uploading": false}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
LOG PowerSync status changed {"connected": true, "dataFlow": {"downloading": false, "uploading": false}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
LOG PowerSync status changed {"connected": true, "dataFlow": {"downloading": false, "uploading": true}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
LOG PowerSync status changed {"connected": true, "dataFlow": {"downloading": false, "uploading": true}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
LOG PowerSync status changed {"connected": true, "dataFlow": {"downloading": false, "uploading": false}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
LOG PowerSync status changed {"connected": true, "dataFlow": {"downloading": false, "uploading": false}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
LOG PowerSync status changed {"connected": false, "dataFlow": {"downloading": false, "uploading": false}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
LOG PowerSync status changed {"connected": false, "dataFlow": {"downloading": false, "uploading": false}, "lastSyncedAt": 2024-04-02T14:53:18.701Z}
DEBUG [PowerSyncStream] Stream input empty
After about 5 seconds from successfully signing in. Not sure why this happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing dev dep.
Adds a recipe for using PowerSync and Supabase to sync local and backend data.
Topcis include: