• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flux Example with React & Meteor

meteor-flux-leaderboard

Flux Example with React & Meteor

Get the benifits of Relay without the wait or complexity

  • Automatic optimistic UI updates (latency compensation)
  • Real time database updates (like Uber's realtime driver location)
  • Mini-Mongo client cache (easy clientside querying)
  • Query based data subscriptions instead of REST (also API REST supported)
  • Data operations in flux are written synchronously because of the optimistic UI

Plus

  • Hot code reload
  • Universal JS shared on client and server (isomorphic)
  • Clean server-side code with fibers (soon with promise ES7 async/await)
  • Easy microservice implementations via DDP
  • Modular, swap out any default Meteor components you wish

Different Flux examples


***Make sure to open the console to see the lifecycle***

logs

Example Photo

Full Readme coming soon! (See this readme for an explanation of the Meteor parts)

Usage

  • cd meteor-flux-leaderboard
  • meteor
  • Open your browser to localhost:3000
  • Checkout action/store logs in console after clicking about

### Todo
  • Basic functinality
  • Handle hot code reload (snapshot and restore on reload)
  • Serverside rendering branch (started, shared files but no SSR)
  • Immutible stores for rendering performance
  • React Router using actions

Key pieces are in CollectionActions/Store, Tracker watches for changes on the Minimongo clientside cache and emits a change event when data changes. This retains all the optimistic UI and realtime data capabilities that Meteor offers.

 Tracker.autorun(computation => {
    var docs = Players.find({}).fetch();
    
    if (computation.firstRun) return; // ignore first empty run
    
    this.CollectionActions.playersChanged(docs);
  });

This is simplified by using a helper package, though I think it's important to know how it works.

trackCollection(Players, CollectionActions.playersChanged);

Alt perks

Alt lets you take snapshots of your apps state and can undo/redo state as needed. You can use this to capture your app state on an error then send log it for debugging remotely.

A chrome extension is availible to help with local debugging:
https://www.youtube.com/watch?v=LUksOCuRjkE

Contributors:

More Repositories

1

RedScript

An Elixir Flavored Language for the Browser
JavaScript
418
star
2

react-ive-meteor

Demo app of React and Meteor using a social feed
JavaScript
243
star
3

Retina-Sprites-for-Compass

A mixin for creating retina sprites with hover & active states
CSS
233
star
4

meteor-react-boilerplate

A starter project for React & Meteor
JavaScript
168
star
5

parse-form

A micro library & Meteor package used to parse and manipulate forms
JavaScript
71
star
6

meteor-redux-example

Redux for Blaze
JavaScript
69
star
7

meteor-generate

Meteor Generate - A Rails Inspired File Generator for Meteor
JavaScript
65
star
8

meteor_elixir

An experiment to eliminate bottlenecks in Meteor
JavaScript
45
star
9

Meteor-RethinkDB-GraphQL

A Meteor and RethinkDB Example Using GraphQL
JavaScript
44
star
10

react-meteor-tests

React Unit Tests in Meteor
JavaScript
39
star
11

meteor-phonegap-oauth

Fixes how Meteor handles OAuth popups on PhoneGap/fullscreen
JavaScript
33
star
12

phoenix-rethinkdb-example

Example App with RethinkDB
JavaScript
22
star
13

Meteor-Cordova-Status

Reactive Cordova Status & Meteor Disconnect/Reconnect Handling
JavaScript
18
star
14

awesome-stack

Elixir
17
star
15

life-changing-programming-lessons

A collection of things I wish I knew 20 years ago
16
star
16

simple-redux-react

A wrapper to get Redux, React, react-router-redux, redux-devtools going in a few lines
JavaScript
16
star
17

meteor-flux-helpers

Meteor package with general flux helpers
JavaScript
15
star
18

backbone-fill-collection

Fill collections with mock data with every fetch.
JavaScript
11
star
19

validate-form

Meteor form validation micro library
JavaScript
11
star
20

reason-simple-form-example

Create React App Example
OCaml
10
star
21

meteor-react-accounts

A set of compossible components to sign in / login / signin / reset password / dropdown
JavaScript
9
star
22

pipes-js

Pipe operators in JS like Elm / Elixir / F#
8
star
23

elixir-stdlib-js

JavaScript
7
star
24

alfred-meteor-atmosphere

Search for Atmosphere Packages with Alfred
7
star
25

alfred-hex-search

Search for Erlang & Elixir packages on Hex with Alfred
6
star
26

restful-js

An opinionated REST framework for Node & Meteor
JavaScript
6
star
27

ocamlish

An OCaml inspired standard library for TypeScript
TypeScript
6
star
28

meteor-graphql-boilerplate

A quick start for using Apollo, Redux, and Meteor
5
star
29

dotfiles

CSS
3
star
30

react-native-navigation-android-example

JavaScript
1
star
31

reason-simple-form

A simple form solution for ReasonML
OCaml
1
star
32

elixir-graphql-issue-54

repro for https://github.com/joshprice/graphql-elixir/issues/54
JavaScript
1
star
33

generator-mgen

Backend for the Meteor Generate CLI
JavaScript
1
star