Meteor - Database and Template

meteor

How can we update our client-side JavaScript code to get our tasks from a collection instead of a static array?

import { Template } from 'meteor/templating';
import { Tasks } from '../api/tasks.js';
import './body.html';

Template.body.helpers({
  tasks() {
    return Tasks.find({});
  },
});
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License