Skip to content

Instantly share code, notes, and snippets.

@jazst21
Created April 6, 2019 06:14
Show Gist options
  • Select an option

  • Save jazst21/885b1d125527d91c88eb2ef60cb1e247 to your computer and use it in GitHub Desktop.

Select an option

Save jazst21/885b1d125527d91c88eb2ef60cb1e247 to your computer and use it in GitHub Desktop.
import React from 'react';
import config1, { Title, Players } from './Config';
import PlayersData from '../api/PlayersData';
import { Tracker } from 'meteor/tracker';
Tracker.autorun(() => {
console.log('players list =', PlayersData.find().fetch());
})
const App = () => (
<div>
<h1>{Title}</h1>
{Players.map(player => <p key={player._id}>{player.name} has {player.score} points</p>)}
</div>
);
console.log(Players);
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment