day8 / re-frame-http-fx

A re-frame "effects handler" for performing Ajax tasks (via cljs-ajax)
MIT License
259 stars 27 forks source link

Move the http-effect into an accessible function #16

Closed kennyjwilli closed 7 years ago

kennyjwilli commented 7 years ago

It'd be great if we could move the handler function for http-effect into a ns declared function. This makes extending this library much easier. For example I can create my own version of :http-xhrio that has the same options as this library presents, only I do some fiddling with the options before submitting the request.

danielcompton commented 7 years ago

This looks pretty unobjectionable. Keep in mind that just requiring that namespace will register the :http-xhrio effect. At some point in the future I think we may require people to call a registration function, rather than relying on side effects of requiring the namespace.

kennyjwilli commented 7 years ago

For sure. And I thought about making a change similar to what you described but figured that is a breaking change and had best be made by a library maintainer. This will solve my problem for the time being. Can we get a new version out soon?

danielcompton commented 7 years ago

Yep, was already in the process of doing a new release :) Should be out now.