Fork me on GitHub
#reagent
<
2020-09-29
>
Trevor00:09:26

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

Trevor00:09:16

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

shivekkhurana16:09:17

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

p-himik16:09:16

It should be easy with the latest alpha version.

shivekkhurana16:09:51

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

shivekkhurana17:09:00

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

p-himik17:09:41

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.

shivekkhurana17:09:21

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.

Grant Isom17:09:58

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

p-himik17:09:03

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

shivekkhurana17:09:45

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-himik17:09:37

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.

👍 3
3
Grant Isom17:09:07

Sweet, thanks for the links and advice!

emccue21:09:45

@U017M2273H7 If its just reagent and no server you can also use static site stuff

emccue21:09:49

like netlify