-
Notifications
You must be signed in to change notification settings - Fork 27
Add React Native Migration Guide #875
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
✅ Deploy Preview for docs-app-services ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Several URL-related items to correct. I think you can consider everything else as a suggestion 👍
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.
Suggest:
- for all of the PDF links, add something to indicate it as a pdf
- e.g.
Ditto Reference Architecture Guide (PDF)
- e.g.
- for links to external guides and docs, something indicating it's not MDB-hosted?
- e.g.
[Atlas Device Sync to Ditto migration guide] in the Ditto documentation
- or
Official [AWS AppSync documentation]
?
- e.g.
@@ -12,6 +12,7 @@ Device Sync Deprecation | |||
:hidden: | |||
|
|||
Migrate to AWS AppSync </sync/migration/awsappsync> | |||
Migrate a React Native Application from Device Sync to PowerSync </sync/migration/reactnativetutorial> |
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.
Migrate a React Native Application from Device Sync to PowerSync </sync/migration/reactnativetutorial> | |
Tutorial: Migrate RN App from Device Sync to PowerSync </sync/migration/reactnativetutorial> |
Do we really need to specify Device Sync
here? Isn't it implied that's what you'd be migrating from?
solution and could be the right solution to migrate to if you have a mobile | ||
application using Device Sync. | ||
|
||
This article will guide you through the steps you need to take in order to |
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 article will guide you through the steps you need to take in order to | |
This tutorial will guide you through the steps needed to |
================================================================ | ||
Migrate a React Native Application from Device Sync to PowerSync | ||
================================================================ |
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.
================================================================ | |
Migrate a React Native Application from Device Sync to PowerSync | |
================================================================ | |
========================================================================== | |
Tutorial: Migrate a React Native Application from Device Sync to PowerSync | |
========================================================================== |
again, do we need to specify from Device Sync
here?
Co-authored-by: cbullinger <[email protected]>
… into DOCSP-46764
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.
Found a few formatting things. I appreciate all the work done here!
Would be important for someone to actually do the tutorial and ensure there aren't any technical pieces that do not work.
configure the PowerSync service, update the local database schemas and | ||
bindings, and set up a backend service for writing to Atlas. | ||
|
||
This tutorial uses a Realm todo list application for React Native available in the [realm2powersync example repository](https://github.com/takameyer/realm2powersync/tree/main). |
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 link was written in markdown. It appears to have not rendered correctly on the page. Ensure this and other links are formatted correctly
`PowerSync Security & IP Filtering <https://docs.powersync.com/installation/database-setup/security-and-ip-filtering>`__ | ||
documentation. | ||
|
||
In the left sidebar, click **Network Access** under the Security heading. |
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.
Would it be useful to have imagery here as well?
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.
We / you had an image here. Cory and I discussed, and felt like the size really broke up the flow and didn't add enough additional value.
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.
OK, so I cropped it and added a red box around the part that is important. LMK what you think.
~~~~~~~~~~~~~~~~ | ||
|
||
To finalize this setup, you will use the | ||
`PowerSync Diagnostics App <https://diagnostics-app.powersync.com/login>` |
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 link didn't render correctly
- Mark items as done | ||
- Delete items | ||
|
||
.. image:: /images/migration/react_native_guide/image9.png |
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.
Image needs some constraints. It's taking up the entire page.
|
||
For this tutorial, you will modify ``source/ItemSchema.tsx`` as follows: | ||
|
||
.. code-block:: bash |
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.
.. code-block:: bash | |
.. code-block:: javascript |
Finally, update ``source/ItemListView.tsx`` to invoke the ``toggleViewAll`` | ||
method in the ``onValueChange`` attribute of the “Show All Tasks” switch: | ||
|
||
.. code-block:: bash |
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.
.. code-block:: bash | |
.. code-block:: javascript |
|
||
First, add the following to ``source/PowerSync.ts``: | ||
|
||
.. code-block:: bash |
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.
.. code-block:: bash | |
.. code-block:: javascript |
Next, refactor the ``source/OfflineModeButton.tsx`` to remove the Realm | ||
functionality and replace it with by invoking the new method: | ||
|
||
.. code-block:: bash |
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.
.. code-block:: bash | |
.. code-block:: javascript |
Finally, open ``source/App.tsx`` and uncomment the ``headerRight`` | ||
component back into the ``Stack.Screen`` of the application: | ||
|
||
.. code-block:: bash |
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.
.. code-block:: bash | |
.. code-block:: javascript |
|
||
First, remove the default sync rules and replace them with the following: | ||
|
||
.. code-block:: bash |
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.
.. code-block:: bash | |
.. code-block:: yaml |
Is there a yaml
formatter for code-block
?
LGTM from @takameyer via Slack. |
Pull Request Info
Jira ticket: https://jira.mongodb.org/browse/DOCSP-46764
Staging Links