GithubHelp home page GithubHelp logo

Comments (8)

spoike avatar spoike commented on June 16, 2024

There seems to be a usecase for this mentioned on twitter by @undoZen:

https://twitter.com/undoZen/status/500573096403693568

@spoike I want to write a "dispatcher" for it because I want to hot reload it while development and transport states from server to browser.

https://twitter.com/undoZen/status/500573412461252610:

@spoike but I found it's very difficult to extend Store prototype, acctually its imposible.

from refluxjs.

SimonDegraeve avatar SimonDegraeve commented on June 16, 2024

I am also interrested by HMR (hot module replacement) provided by webpack. Would be nice to have feedback from @undoZen.

from refluxjs.

spoike avatar spoike commented on June 16, 2024

Never heard of webpack until now. I've seen some small projects before that loads module packs form the server, but not really hotswapping like replacing code completely. Seems wickedly cool and I wouldn't mind listening in on a discussion for this and if there is anything we can do with reflux to make this simpler.

from refluxjs.

SimonDegraeve avatar SimonDegraeve commented on June 16, 2024

You should definitely check react-hot-loader. I use it in my daily development and it's pretty awesome. Since I am new to Reflux I need more experience to see if it integrates well with this loader.

from refluxjs.

undoZen avatar undoZen commented on June 16, 2024

I'm also new to these kind of stuff: react, flux, webpack HMR, etc. So much cool things to learn and experiment, very exciting.

Actually I didn't quite get how so called flux architecture works with dispatcher suggested by facebook or yahoo, until I find this project and read @spoike's blog on ghost.io, it all make sense about how actions and store should be working together for me.

I am also experimenting with webpack HMR recently, and I tried develop a personal project using reflux, react and react-hot-loader, but I found the stores won't work with hot reload because old version of stores still exists in memory since they are still listening to actions and be listened by other stores. Also I think the dehydrate/rehydrate feature from yahoo's dispatchr is very cool because that make server generation of static page of SPA react app possible.

So there are reasons to have a dispatcher. I'm starting to build one based on reflux, but found that the store prototype is difficult to extend.

Here's what I got now. You can refer to the test case to get how should it be working with re-definition of stores. It works but I have to monkey patch the listen method and alter the store definition now, if I can extend mixins of them it must be easier for me to implement this dispatcher module.

from refluxjs.

undoZen avatar undoZen commented on June 16, 2024

I hope 0.1.8 could include this enhancement. I'll try to make a pull request late this week.

from refluxjs.

spoike avatar spoike commented on June 16, 2024

Sure. :-) I've tried but unfortunately managed to break a lot of tests in the process. So I have to defer to this until later or unless anyone else want to help out.

from refluxjs.

spoike avatar spoike commented on June 16, 2024

This is done by @krawaller among the pull requests for the work on 0.1.8, see #67.

What is left is to document the listenerMethods and the other mixins properly.

from refluxjs.

Related Issues (20)

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.