|
@@ -7,12 +7,20 @@ if (Meteor.isClient) {
|
|
|
passwordSignupFields: "USERNAME_ONLY"
|
|
|
});
|
|
|
|
|
|
+ Meteor.subscribe("tasks");
|
|
|
+
|
|
|
Meteor.startup(function () {
|
|
|
// Use this branch to render the component after the page is ready.
|
|
|
ReactDOM.render(<App />, document.getElementById('render-target'));
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+if (Meteor.isServer) {
|
|
|
+ Meteor.publish("tasks", function () {
|
|
|
+ return Tasks.find();
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
Meteor.methods({
|
|
|
addTask(text) {
|
|
|
// Make sure user is logged before inserting a task.
|