Skip to content

Commit 49d25c2

Browse files
authored
edits to nodejs and react tutorial texts (#513)
1 parent 9f88cf7 commit 49d25c2

File tree

3 files changed

+24
-28
lines changed

3 files changed

+24
-28
lines changed

source/includes/steps-tutorial-react-native.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ref: connect-to-your-mongodb-realm-app
121121
content: |
122122
To get the app working with your backend, you first need to instantiate the
123123
Realm app. The Realm app is the interface to the MongoDB Realm backend.
124-
Navigate to the getRealmApp.js file and complete the ``getRealmApp()``
124+
Navigate to the ``getRealmApp.js`` file and complete the ``getRealmApp()``
125125
function implementation:
126126
127127
.. literalinclude:: /tutorial/generated/code/final/getRealmApp.codeblock.get-realm-app.js
@@ -134,8 +134,8 @@ content: |
134134
title: Implement the AuthProvider
135135
ref: implement-the-auth-provider
136136
content: |
137-
Navigate to providers/AuthProvider.js. In this file, and in the
138-
providers/TasksProvider.js file that we will complete a bit later, we use
137+
Navigate to ``providers/AuthProvider.js``. In this file, and in the
138+
``providers/TasksProvider.js`` file that we will complete a bit later, we use
139139
React :reactjs:`Context <docs/context.html>` and :reactjs:`hooks
140140
<docs/hooks-overview.html>` to implement a data provider pattern. Don't worry
141141
if you aren't too familiar with these constructs yet. The basic idea is as
@@ -179,7 +179,7 @@ content: |
179179
realm may be empty when first opened. Add an observer to the collection of
180180
users in that realm in order to watch for the user object first appearing as
181181
well as any changes to the its Project memberships. When a user object is
182-
available, read its memberOf field to populate the available Project data for
182+
available, read its ``memberOf`` field to populate the available Project data for
183183
any descendant of the provider:
184184
185185
.. literalinclude:: /tutorial/generated/code/final/AuthProvider.codeblock.open-user-realm.js
@@ -192,7 +192,7 @@ content: |
192192
.. literalinclude:: /tutorial/generated/code/final/AuthProvider.codeblock.user-realm-cleanup.js
193193
:language: javascript
194194
195-
Check out the App.js, view/WelcomeView.js, and view/ProjectView.js files to
195+
Check out the ``App.js``, ``view/WelcomeView.js``, and ``view/ProjectView.js`` files to
196196
see how they use the AuthProvider's signIn, signUp, and signOut functions and
197197
user data via the ``useAuth()`` hook function. The ProjectView also uses the
198198
Project data to populate the list of Projects available to the logged-in user.
@@ -203,7 +203,7 @@ title: Define the Task Schema
203203
ref: define-the-task-schema
204204
content: |
205205
In order to work with Task objects in the Realm Database, we need to define
206-
their schema. Navigate to the schemas.js file to complete the Task class's
206+
their schema. Navigate to the ``schemas.js`` file to complete the Task class's
207207
schema definition:
208208
209209
.. literalinclude:: /tutorial/generated/code/final/schemas.codeblock.react-native-task-schema.js
@@ -253,31 +253,31 @@ content: |
253253
.. literalinclude:: /tutorial/generated/code/final/TasksProvider.codeblock.delete-task.js
254254
:language: javascript
255255
256-
Check out the views/TasksView.js and components/TaskItem.js files to see how
256+
Check out the ``views/TasksView.js`` and ``components/TaskItem.js`` files to see how
257257
they use the provider's task data and functionality via the ``useTasks()``
258258
hook function.
259259
---
260260
title: Implement Team Management
261261
ref: implement-team-management
262262
content: |
263263
A user can add other users to their team, which allows them to view, edit, and
264-
delete Tasks on the user's Project. The ManageTeam component implements this
264+
delete Tasks on the user's Project. The ``ManageTeam`` component implements this
265265
functionality by calling a few Realm functions on the backend that we defined
266266
earlier.
267267
268-
Navigate to components/ManageTeam.js. First, we need to fetch the list of
268+
Navigate to ``components/ManageTeam.js``. First, we need to fetch the list of
269269
current team members:
270270
271271
.. literalinclude:: /tutorial/generated/code/final/ManageTeam.codeblock.get-team.js
272272
:language: javascript
273273
274-
Next, call the addTeamMember function on the backend to implement add team
274+
Next, call the ``addTeamMember`` function on the backend to implement add team
275275
member functionality:
276276
277277
.. literalinclude:: /tutorial/generated/code/final/ManageTeam.codeblock.add-team-member.js
278278
:language: javascript
279279
280-
Finally, call the removeTeamMember function on the backend to implement remove
280+
Finally, call the ``removeTeamMember`` function on the backend to implement remove
281281
team member functionality:
282282
283283
.. literalinclude:: /tutorial/generated/code/final/ManageTeam.codeblock.remove-team-member.js

source/tutorial/nodejs-cli.txt

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,39 +83,32 @@ directly from GitHub:
8383

8484
.. code-block:: console
8585

86-
git clone [email protected]:mongodb-university/realm-tutorial.git
86+
git clone [email protected]:mongodb-university/realm-tutorial-node-js.git
8787

8888
.. important::
8989

90-
The ``main`` branch is a finished version of the app as it should look *after*
90+
The ``final`` branch is a finished version of the app as it should look *after*
9191
you complete this tutorial. To walk through this tutorial, please check
92-
out the ``todo`` branch:
92+
out the ``start`` branch:
9393

9494
.. code-block:: console
9595

96-
git checkout todo
96+
git checkout start
9797

98-
In your terminal, run the following commands to navigate to the task tracker
99-
client application and install its dependencies:
98+
In your terminal, run the following command to install its dependencies:
10099

101100
.. code-block:: console
102101

103-
cd realm-tutorial/node-cli
104102
npm install
105103

106104
C. Explore the App Structure & Components
107105
-----------------------------------------
108106

109-
The ``realm-tutorial`` repo contains task tracker client applications for
110-
multiple platforms. The project root for this tutorial is located in the
111-
``node-cli`` subdirectory. Open a text editor to explore the directory and
112-
files.
113-
114107
This application has a flat project structure: all of the files are in the root
115-
directory. In this tutorial, we'll be focusing on 5 files: ``config.js``,
116-
``users.js``, ``tasks.js``, ``team.js``, ``projects.js``. The other files provide the
117-
underlying structure for the CLI. The following table describes the role of
118-
important files in this project:
108+
directory. Open a text editor to explore the directory and files. In this tutorial,
109+
we'll be focusing on 5 files: ``config.js``, ``users.js``, ``tasks.js``, ``team.js``,
110+
``projects.js``. The other files provide the underlying structure for the CLI. The
111+
following table describes the role of important files in this project:
119112

120113
.. cssclass:: config-table
121114
.. list-table::

source/tutorial/react-native.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ React Native. This tutorial illustrates the creation of a "Task Tracker" React N
2020
application that allows users to:
2121

2222
- Sign in to their account with their email and password and sign out later.
23-
- View, create, modify, and delete tasks.
23+
- View a list of projects they are a member of.
24+
- View, create, modify, and delete tasks in projects.
25+
- View a list of team members in their project.
26+
- Add and remove team members to their project.
2427

2528
This tutorial should take around 30 minutes.
2629

0 commit comments

Comments
 (0)