How to use the flux/utils.Container.create function in flux

To help you get started, we’ve selected a few flux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github naustudio / nau-jukebox / imports / components / TabTopList.js View on Github external
newUserList = _.sortBy(newUserList, i => -1 * (1000 * i.status.online) - (i.balance || 0));

		// Session.set('USER_LIST', newUserList);
		return newUserList;
	};

	const naustormData = getNaustormData();
	const newUserList = mergeData(naustormData);

	return {
		startWeek,
		endWeek,
		naustormData: naustormData.naustorm_data,
	};
})(Container.create(TabTopList));
github naustudio / nau-jukebox / imports / components / TabUsers.js View on Github external
if (user.services.google) {
						picture = user.services.google.picture || picture;
					} else if (user.services.goalify) {
						picture = user.services.goalify.avatar || picture;
					} else if (user.services.facebook) {
						picture = `https://graph.facebook.com/v2.10/${user.services.facebook.id}/picture?type=square`;						
					}
				}
				/* eslint-disable no-param-reassign */
				user.profile.picture = picture;

				return user;
			},
		}
	).fetch(),
}))(Container.create(TabUsers));
github commoncode / ontap / client / src / components / kegs / keg-detail.js View on Github external
return {
      keg: kegDetailStore.getState(),
      profile: profileStore.getState().data,
    };
  }

  componentWillMount() {
    fetchKeg(this.props.kegId);
  }

  render() {
    return ;
  }
}

export default Container.create(KegDetailContainer, { withProps: true });
github azu / hatebu-mydata-search / src / App.js View on Github external
};
    }

    render() {
        return <div>
            <div>
                
                
            </div>
            
            
        </div>
    }
}

const AppContainer = Container.create(App);
ReactDOM.render(, document.getElementById("js-main"));
github commoncode / ontap / client / src / components / breweries / brewery-select.js View on Github external
}

  static calculateState() {
    return brewerySelectStore.getState();
  }

  componentWillMount() {
    fetchBreweries();
  }

  render() {
    return ;
  }
}

export default Container.create(BrewerySelectContainer, { withProps: true });
github naustudio / nau-jukebox / imports / components / TabSongs.js View on Github external
const songHandle = Meteor.subscribe('Songs.public');
	today.setHours(0, 0, 0, 0);

	return {
		isLoadingSong: !songHandle.ready(),
		songs: Songs.find(
			{
				timeAdded: { $gt: today.getTime() },
				roomId: currentRoom ? currentRoom._id : null,
			},
			{
				sort: { timeAdded: 1 },
			}
		).fetch(),
	};
})(Container.create(TabSongs));
github piglovesyou / react-server-side-rendering-with-css-modules / src / client / components / application / index.js View on Github external
return (
      <div>
        
        <div>
          
          <div>
             } /&gt;
             } /&gt;
          </div>
        </div>
      </div>
    );
  }
}

module.exports.default = Container.create(Application);
github nexxtway / react-rainbow / suite / app / app.jsx View on Github external
{ this.props.children }
                
            
        );
    }

    renderComponentItems() {
        let components = Object.keys(this.state.components.toJSON());

        return components.map(componentName =&gt; {
            return  this.props.router.push(`/component/${ componentName }`) } key={ componentName } /&gt;;
        });
    }
}

export default Container.create(App);
github Glimpse / StickerApp / client / src / containers / cart-container.js View on Github external
{cartView}
            
        );
    }
});

CartContainer.getStores = () =&gt; [ cartStore, authStore ];

CartContainer.calculateState = () =&gt; ({
    cart: cartStore.getState(),
    auth: authStore.getState()
});

export default Container.create(CartContainer);
github oneut / async-react-router / examples / flux-utils / src / containers / UserContainer.js View on Github external
return {
      user: props.stores.userStore.getState()
    };
  }

  render() {
    return (
      <div>
        <header>
        
      </header></div>
    );
  }
}

const userContainer = Container.create(UserContainer, {
  withProps: true
});
export default userContainer;