Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
texirv0203
@texirv0203
@all need help...I tried but not able to proceed https://gist.github.com/js08/0ec3d70dfda76d7e9fb4
Albert
@holoiii
I'm following the guide for handling async actions here: http://fluxxor.com/guides/async-data.html - what's the best way to make an instance of an api client available to the action? Should I pass it in to the component and then pass it to the action as an argument upon dispatch?
The example in the guide used a global variable to store the client api which was then available to the action creator
But I want to use an instance of an api client which isn't available in the global scope
Albert
@holoiii
Another question - what's a good way to dispatch multiple actions that need to happen one after the other?
ushlepok
@ushlepok

i have fluxxor app with react 0.13 and react router 0.13. i want to update dependencies and use latest react with react-router 2. previously react router had an instance that i could pass to stores like this:

var router = Router.create({
  routes: routes,
  location: Router.HistoryLocation
});

var flux = new Fluxxor.Flux(getStores({router: router}), actions);

but now there is no such instance
i haven't yet understand how to make transitions from stores

ushlepok
@ushlepok
solved this problem %)
friendOfOurs
@friendOfOurs
Is it a good practice / good design principle to have components "communicate" with stores only on the very bottom level? I propagate the flux instance from the root app down through all levels of component hierarchy and have very atomic components speak with e.g. Input. I am asking because I read that the best practice is to have state in the top level and to propagate it down the hierarchy to child components
Arthur Schwaiger
@Colmea
It's not a good practice
Actually, you should keep in mind that the less you "fluxify" a component (listen to store, trigger actions), the more it's reusable in another part of your app
You shouldn't use flux instance in your Input, never
Arthur Schwaiger
@Colmea
The solution is to create smart and dumb components. Dump components are "real" React components, which receive props and display content based on these props. On the opposite, smart components are kind of parent containers that are connected to flux and are responsible to fetch data from store, call actions, and so on.
vivek poddar
@vivekimsit
@/all guys I need to learn maintainable and flexible front end architecture, I have experience with Angularjs but I am not specific to any framwork, I need to learn best practices, is this the right place?
Arthur Schwaiger
@Colmea
Maybe you should start with Flux concept. Then start with à Flux implementation like fluxxor (you also have Redux or Alt.js)
Note that Flux concept is better with React.js or à similar view layer
r0ber70
@r0ber70
btw ReactMixin.onClass(NewCarePlan, Fluxxor.FluxMixin(React)); seems to be working Thank you, saved me a lot of trouble! :D Please put this in the docs!
Jay Nanavati
@jaysnanavati
Hey - Im trying to understand the "global state" issues with flux architectures
Nitish Dhar
@nitishdhar
Hello people
Anyone around?
I need some help with dependent stores e.g. Data is fetched for one store and now in the UI I need to fetch data for its association.. How can I do this after the first store is done & has completed its actions
Basically how can I call an action after a previous action is done
Punita Ojha
@punitaojha
This message was deleted
texirv0203
@texirv0203

hi,

  • I am trying to learn rxjs.
  • I have a simple application retrieving values from api through rxjs.
  • I am trying to achieve Set token expiration to 2 minutes and if backend service responds with a 'Unauthorized' error, get the token again and use it.
  • can you guys tell me how to add it to my code.
  • providing my code below.

http://jsfiddle.net/5n7qdcx7/

Rx.Observable.fromPromise($.getJSON('https://api.github.com/users'))
                .subscribe(users => {
                    console.log('users ready', users);

                    $('.pai-del-menu').hide();
                    var grid = $("#grid").kendoGrid({
                        dataSource: {
                            data:
texirv0203
@texirv0203

hi,

  • initialy when I go sports.com and from there if I go to players it works fine.
  • after that in the same players url if I enter I am getting the below error message.
  • any idea how to fix in js

http://sports.com/players/playersJumping


Error

HTTP Status 404Not Found

Type Status Report

Message /players/playersJumping

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

Apache Tomcat/8.5.23
Mudit Khurana
@avacode
Hi I have some questions about making ajax calls in fluxxor/react architecture. Is this room still active?