Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Morteza Shahriari Nia
    @mshahriarinia
    @chrismbeckett Do you have any clues what that man replies?
    Chris Beckett
    @chrismbeckett
    @mshahriarinia He is basically telling you the same thing, just not very clear. The point he is trying to make is that your server-side routes need to be isoloated (e.g. under an /api/) path in Express on the server, so that when React-Router runs in the client it doesn't screw up calling your REST API.
    Morteza Shahriari Nia
    @mshahriarinia
    I see, I see. Thank you again! Cheers
    Chris Beckett
    @chrismbeckett
    @mshahriarinia This is a standard issue when you are serving your web application and the REST API on the same domain whether you are doing an SPA (Single Page App) or not. You need to design a seperation of concern between the routes that are for your web app, and the routes for your API.
    Morteza Shahriari Nia
    @mshahriarinia
    true
    Eric Fields
    @ericdfields
    an issue i'm having, not sure if flummox or babel is my problem: https://gitter.im/babel/babel?at=555b5ee3076ab5646e6e29cb
    Konstantin
    @slyder
    Hello, i have isomorphic application with user authentication and in action i should have user cookies to pass them to action request . For now i pass express req variable into performRouteHandlerStaticMethod method, and then repass to action in routerWillRun method
    here is gist: https://gist.github.com/slyder/a66848456b99987ade79#file-gistfile1-txt
    Which is the best way to do it?
    Darío Javier Cravero
    @dariocravero
    @ericdfields it might be binding, have you tried MyAppGlobal.socket.bind('data',this.methodB.bind(this))?
    paulwehner
    @paulwehner
    What is the difference between flummox and alt? why would you choose one over the other?
    Darío Javier Cravero
    @dariocravero
    @paulwehner I'm currently using both Marty and Flummox_ and even though I'm pretty confident with _Marty's codebase, I've been finding _Flummox way simpler to understand and hack around (which I think is very important as it gives you confidence with the code). It doesn't have all of the things that _Marty has (like StateSources (which is an abstraction to some utils to connect to APIs, etc.) and de/rehydration out of the box) but the way it's put together makes it very easy to extend it.
    I haven't had a chance to really try alt_, but from what I remember, when you use it with flux instances you get something rather similar to _Flummox, at least in syntax.
    Kamil Lelonek
    @KamilLelonek
    is gitter or slack more used for Flummox?
    Daniel Dunderfelt
    @danieldunderfelt
    @KamilLelonek Ha! I think you have an answer to yor question :shipit:
    Daniel Steigerwald
    @steida
    I wonder why anyone needs Flux framework. Isn't vanilla state-less atomic Flux much better? github.com/steida/este
    I am just curious which use cases I overlooked. Feel free to tell me I am wrong : )
    Tycho Tatitscheff
    @tychotatitscheff
    @steida I may say smtg wrong but I think each framework has some qualities and default. For instances flummox simplify the flux paradigm with auto dispatching action, removing singleton, providing a nice way to remplace mixins (not suported with ES6 react) and lastly providing a "Flux" class that encapsulate all Actions, Store and components in order to make isomorphic app so much easier.
    Daniel Dunderfelt
    @danieldunderfelt
    Yep. You could write it yourself pretty easily, but having a finished, tested library to simply npm install is very valuable
    Vicente de Alencar
    @vicentedealencar
    @steida, I like flummox and este., so I am gonna put them together
    I think flummox is easier to reason about, than vanilla flux
    Darío Javier Cravero
    @dariocravero
    @steida to add to everyone else's comments, after implementing a pattern for a while abstractions become really handy.
    Also, having a common ground to work on top of helps concepts evolve - having used (and contributed in some cases) raw flux, marty and flummox quite extensively I'm a witness of that :)
    Jan Kopriva
    @jankopriva
    Hi, we are facing the following problem. We have and app that needs to have some bootstrap data prior to any other actions are taken. Therefore, we created bootstrap component that wraps any other component. In bootstrap component, we issue get bootstrap data request that results in XHR. When bootstrap data arrives bootstrap store success handler is executed in which we have setState call that triggers componentWillMount() on the inner component. This also issues another XHR call. The problem is that we got an error, because actions can't be dispatched in the middle of another action dispatch. The thing is that dispatching is not yet ended until the bootstrap success handler reuturns.
    My question is how to handle such scenarios. Following code ilustrates the handler:
    handleBootstrapSuccess(data) {
    this.replaceState({
    loading: false,
    bootstrap: data.bootstrapResource
    });
    }
    replaceState triggers the other component's componentWillMount(), but the dispatching is not yet finished...
    Vicente de Alencar
    @vicentedealencar
    In my understanding, the bootstrap component render function should only return the inner component if this.props.bootstrap has value
    Darío Javier Cravero
    @dariocravero
    @jankopriva you can probably benefit from the concept of "queries" introduced in Marty a while ago I made an abstraction and reference implementation in Flummox here's how you would use it on a store, how you define the queries, you could then use it from a container or somewhere else
    Daniel Dunderfelt
    @danieldunderfelt
    Hi! I have an error with my flummox@4-alpha2 and react@0.14-alpha3 setup. When using FluxComponent, Flummox doesn't seem to be able to import a react addon, resulting in this error message: Error loading "npm:react@0.14.0-alpha3/addons/{addon}" at http://localhost:3000/jspm_packages/npm/react@0.14.0-alpha3/addons/{addon}.js
    is this fixable, am I doing soomething wrong, or does Flummox simply not support React 0.14?
    Jan Kopriva
    @jankopriva
    @dariocravero I have just learned the issue is solved in upcoming version of flummox. If I understand the fix well, the store state update will be emit after the the dispatching ends.
    Anyway the another approach might be to have any other store that needs it to wait For bootstrap store
    Andrey Okonetchnikov
    @okonet
    Hey! I'm wondering what if the most appropriate way to implement Store persisting on the server-side. Should it be in the action or in the store itself? Any articles on this topic?
    Darío Javier Cravero
    @dariocravero
    @okonet I don't know if there's A way to go about it :) I tend to put call to asynchronous stuff in actions and that includes any persistence to a backend
    Kevin Smith
    @ksmth
    @jankopriva: if you're using RR, there's a neat pattern on there docs
    Andrey Okonetchnikov
    @okonet
    Yeah, I'm doing it also in actions for now. But I think it would be cool to add a persistency level which would use serialize and deserialize static methods...
    But this will require a clean separation of data and UI stores I think (which is good after all I think)
    Dragos Tudorache
    @fk1blow
    guys, in flummox, can i dispatch an action, handle the state update inside the store and then, based on that state, render a component that will trigger another action?
    because in alt(though i'm positive i've missed sometjing) it seems that a store update that modifies the state and then re-triggers another action, will throw an error
    David Hérault
    @dherault
    Hello guys,
    I can't really figure out the difference between static async routerWillRun({ flux }) {//fetch data} and MyComp = connectToStores(MyComp) { //fetch data} in my (smart/stateful) react component, anyone knows? Thanks !
    Jan Kopriva
    @jankopriva
    @fk1blow I guess that you hit the error that you can't dispatch another action in the middle of dispatch of the previous one?
    Darío Javier Cravero
    @dariocravero
    Hi @acdlite, I hope you're doing well :) It seems that 4.0 is just around the corner but there are still a good few unresolved issues hanging. Could you use some help in running through them? Also, by seeing your contributions to redux I can imagine that some of those ideas may make it into Flummox too which would be amazing :) Is there any roadmap ideas going forward? Thanks
    james-s-turner
    @james-s-turner
    Hi @acdlite. On the main page you say "Flummox also gives you the ability to serialize the initial state of your application on the server". I can't find any details or examples of how to send server-side state down to the client and synchronize the store state. Any pointers would be gratefully received . Thanks
    Jamie Rolfs
    @jrolfs
    @james-s-turner I believe your looking for “serialize/deserialize” here: http://acdlite.github.io/flummox/docs/api/flux
    it’s at the bottom of the page
    Jamie Rolfs
    @jrolfs
    er, *you’re, how embarrassing
    Oleg Akbarov
    @olegakbarov
    Hey guys! Can anyone advice me proper solution for performing the optimistic updates with vanilla (no immutableJS) flummox?
    Mike Bannister
    @possibilities
    right now i think i want an action that dispatches twice, once immediately and once after an async process takes place. is that legit or is there some better way to handle this? this isn't about a loading indicator or anything it's just that one store is interested in the initial data and another is interested in data that is fetched based on the initial data.
    BVS BHARAT KUMAR
    @bvsbharat
    hi
    i need help on the
    on of my project can any one help me
    i am using the flummox
    for data rendering from JSON data into grid