Skip to content
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

(DOCSP-31536) Update RN quick start #3141

Merged
merged 13 commits into from
Jan 10, 2024

Conversation

krollins-mdb
Copy link
Collaborator

@krollins-mdb krollins-mdb commented Jan 5, 2024

Pull Request Info

Jira ticket: https://jira.mongodb.org/browse/DOCSP-31536

  • Quick Start
    • Migrated the quick start examples from the legacy test suite to the v12 test suite.
    • Updated examples to use the latest @realm/react conventions.
    • Wrote new tests for the new test app components.
    • Refactored the tutorial content where needed.

Reminder Checklist

Before merging your PR, make sure to check a few things.

  • Did you tag pages appropriately?
    • genre
    • meta.keywords
    • meta.description
  • Describe your PR's changes in the Release Notes section
  • Create a Jira ticket for related docs-app-services work, if any

Release Notes

  • React Native SDK
    • React Native/Quick Start: Rewrite the Quick Start to use the latest @realm/react conventions and Realm.js v12 features.

Review Guidelines

REVIEWING.md

Animal Wearing a Hat

- Create examples
- Generate snippets
- Update quickstart content
- Update sync content
- Reorganize a bit of content
Copy link

github-actions bot commented Jan 5, 2024

Readability for Commit Hash: 545a3c2

You can see any previous Readability scores (if they exist) by looking
at the comment's history.

Readability scores for changed documents:

  • source/sdk/react-native/quick-start: Grade Level: 6.5, Reading Ease: 68.57

For Grade Level, aim for 8 or below.

For Reading Ease scores, aim for 60 or above:

Score Difficulty
90-100 Very Easy
80-89 Easy
70-79 Fairly Easy
60-69 Medium
50-59 Fairly Hard
30-49 Hard
0-29 Very Hard

For help improving readability, try Hemingway App.

@krollins-mdb krollins-mdb marked this pull request as ready for review January 8, 2024 15:20
Copy link
Collaborator

@cbullinger cbullinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

import {useQuery} from '@realm/react';
import {Profile} from '../../models';

export const Read = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

:emphasize-lines: 41-47, 54-60
Instead, you can use :js-sdk:`Realm.objects <classes/Realm-1.html#objects>` for
collections or :js-sdk:`Realm.objectForPrimaryKey
<classes/Realm-1.html#objectForPrimaryKey>` a single object.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to link to the Read page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should! Thanks for suggesting.

source/sdk/react-native/quick-start.txt Outdated Show resolved Hide resolved
#. Pass your object models to the ``schema`` prop.
#. Add other :realm-react-sdk:`Configuration object <types/Realm.BaseConfiguration.html>`
properties as props to ``RealmProvider``. For example, make the realm read
only or add Atlas Device Sync.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, make the realm read only or <something else that isn't Device Sync>.?
IDK why this is bugging me, but maybe omit since "adding Device Sync" isn't equivalent to passing a read-only parameter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looking at it now, I don't think this sentence adds much. I'll remove the whole thing.

krollins-mdb and others added 2 commits January 9, 2024 13:38
Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com>
@krollins-mdb krollins-mdb merged commit 2195efb into mongodb:master Jan 10, 2024
5 of 6 checks passed
@docs-builder-bot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants