-
Notifications
You must be signed in to change notification settings - Fork 49
Django RN demo app: fix some issues picked up during Django backend cleanup #217
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
Conversation
🦋 Changeset detectedLatest commit: af08596 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
React.useEffect(() => { | ||
Logger.useDefaults(); | ||
Logger.setLevel(Logger.DEBUG); | ||
|
||
const getSession = async () => { | ||
const response = await fetch('http://127.0.0.1:8000/api/get_session', { |
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.
Previously the URL was hardcoded, but besides that the get_session
endpoint always returns a valid session. Which makes this logic not really have an affect.
The user should now be able to register and login - although that is not strictly required by the backend (it will create tokens for PowerSync either way). This login screen process does at least keep this demo in line with other Todolist demos. Correct session management can be added later. Users will unfortunately have to signin each time the app boots. Alternatively signin could just be dropped altogether.
@@ -2,20 +2,26 @@ import { Column, ColumnType, Index, IndexedColumn, Schema, Table } from '@powers | |||
|
|||
export const AppSchema = new Schema([ |
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.
can this be changed to use the V2 table?
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.
Yeah can do that. This now uses TableV2
Overview
Builds on work in powersync-ja/powersync-django-backend-todolist-demo#3
Testing
This was tested with the local Django backend
nodejsreactnative.mp4