Do channels supersede AJAX?

Doing a little web app in Phoenix for fun and practice and it came time to do some dynamic page updating, so I reached for my handy AJAX tools… and couldn’t find them.

There is a closed issue about porting some of Rails’ ujs stuff. How is this done in Phoenix? Are there any helpers or conveniences at all or just gotta do everything “manually”?

Which got me wondering… since there is so much focus on channels already, why not just do this stuff over channels?

Thanks for the help.


@cjbottaro I’m curious, what was your conclusion in the end?


You can use the fetch API to make requests in the latest browsers. No need for jQuery-type stuff.


I still haven’t had a chance to build a Phoenix app, so still no conclusion. :confused:

1 Like