This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import '/imports/api/tasks/methods.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import './register-api.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import '/imports/startup/server'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Mongo } from 'meteor/mongo'; | |
| export const Tasks = new Mongo.Collection('Tasks'); | |
| Tasks.initSampleData = function() { | |
| // Tasks.remove({}); | |
| Tasks.insert({name: "Testtask 1"}); | |
| Tasks.insert({name: "Testtask 2"}); | |
| Tasks.insert({name: "Testtask 3"}); | |
| Tasks.insert({name: "Testtask 4"}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Meteor } from 'meteor/meteor'; | |
| import { Tasks } from '/imports/api/tasks/tasks.js'; | |
| export default class InitSampleData extends React.Component { | |
| constructor(props) { | |
| Meteor.subscribe('Tasks.all'); | |
| super(props); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default class MyTodos extends React.Component { | |
| render() { | |
| return ( | |
| <h2>Your Todos</h2> | |
| ); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <head> | |
| <title>my-todos</title> | |
| </head> | |
| <body> | |
| <h1>My Todos</h1> | |
| <div id="my-todos"></div> | |
| </body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Meteor } from 'meteor/meteor'; | |
| import React from 'react'; | |
| import { render } from 'react-dom'; | |
| import MyTodos from '../imports/ui/components/my-todos.js'; | |
| Meteor.startup(() => { | |
| render(<MyTodos />, document.getElementById('my-todos')); | |
| }); |