Giter VIP home page Giter VIP logo

fluxthis.io's People

Contributors

alanfoster avatar brandonhuang avatar jacobdfriedmann avatar jhorwit2 avatar jmrog avatar lamp avatar thepelkus avatar tjwudi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fluxthis.io's Issues

question: ApiActionCreator-esk class for other remote protocols

Hey all,

Pulling FluxThis into my project because it's awesome, hands down. It's saving me so much time, so thanks for that!

In addition to hitting a restful API from my web client, I'm also publishing messages to a cloud messaging solution, PubNub.

What would be awesome, is if there was a nice place to plug their js client (or any other remote protocol client) into some kind of ActionCreator that manages the remote message flow just like ApiActionCreator does. However, instead of send(...) building and sending the XmlHttpRequest, send could be a required function supplied in the options hash. successTest could be required in this case as well to determine response validity.

So, you'd have ActionCreator for generic internal actions, ApiActionCreator that covers (probably most) server communication, and a RemoteActionCreator to support other remote client frameworks.

I totally get that your "super opinionated" framework may not want to include a hook to "send stuff however you want" so I'd understand hesitation, but I'm hoping you could see the value-add here for scenarios like mine.

In the meantime, I've simply extended ActionCreator to do what I've described above and I'd be happy to submit a pull request! Or, is there a more appropriate way to do this within the bounds of the framework as is? I've seen some code examples of making remote requests in ActionCreator.createPayload, which seems a little odd/misleading to me. But if that's the preferred approach, let me know!

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.