reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
Trevor 2020-09-29T00:50:26.010500Z

Hi folks, I’m looking to make an app with video conferencing and AWS chime looks pretty nice. They have a react component library that might make it super easy, but it uses a lot of providers, is there a way I can interop with those nicely in reagent? (Be able to do ‘useContext’ and stuff?) https://github.com/aws/amazon-chime-sdk-js

Trevor 2020-09-29T00:51:16.011600Z

And I’m guessing I’d have to use their hooks to get at the underlying state in the providers create

shivekkhurana 2020-09-29T16:38:17.012200Z

You can use hooks with Reagent but not as easily as you can with React. It's easy.

p-himik 2020-09-29T16:39:16.012500Z

It should be easy with the latest alpha version.

shivekkhurana 2020-09-29T16:40:51.012600Z

Is there any significant change ? I have been referring to this doc so far: https://github.com/reagent-project/reagent/blob/master/doc/ReactFeatures.md

shivekkhurana 2020-09-29T17:13:00.013200Z

@trevor670 I have put together an example of using Ratoms and React Hooks. As @p-himik pointed, its easy with the latest alpha version : https://gist.github.com/shivekkhurana/433e3e130bb1c02df8bff7dfc4538a2c Hope it helps.

p-himik 2020-09-29T17:14:41.013500Z

But it doesn't really use the new function components - with them, I don't think you would need a wrapper component. I don't know for sure though.

Grant Isom 2020-09-29T17:25:58.014Z

Anyone have any good resources for deploying a reagent app with docker?

p-himik 2020-09-29T17:28:03.014100Z

It shouldn't be any different from any other deployment scenario.

shivekkhurana 2020-09-29T17:28:45.014300Z

Reagent app is just a set of JS and HTML files post build process. Any guide on deploying React with Docker will work: • https://codeburst.io/serve-react-apps-with-docker-and-ssl-like-a-boss-e2d6d18553b7https://mherman.org/blog/dockerizing-a-react-app/ (disclaimer: the first post is written by me)

p-himik 2020-09-29T17:29:37.014700Z

Even the "React" part can be removed - you just write your Dockerfile according to the build steps and the artifacts that they produce, that's it. It's not even frontend-specific.

👍 1
➕ 1
Grant Isom 2020-09-29T17:31:07.015200Z

Sweet, thanks for the links and advice!

shivekkhurana 2020-09-29T17:36:21.015400Z

I'm working on something similar and just found the doc on functional compiler: https://github.com/reagent-project/reagent/blob/master/doc/ReagentCompiler.md The example I posted is just one way to go about it.

emccue 2020-09-29T21:25:45.015700Z

@grant.isom If its just reagent and no server you can also use static site stuff

emccue 2020-09-29T21:25:49.015900Z

like netlify