Coding the Display Books Functionality
Learn and build the display books functionality in the bookshop application.
We'll cover the following...
Getting data from a MeteorJS application, as we’ve seen throughout this series, involves three steps. The steps involved are:
- Data publication from the server.
- Subscription to the data from the client.
- Pulling the data into the React component using the
useTracker
function that’s imported from themeteor/react-meteor-data
package.
Publishing book data
This functionality involves displaying books stored in the database at the frontend. Open the file located at imports/api/books/server/publication.js
. Remember that data publication in Meteor takes place on the server.
On line 2, the BookCollection
is ...