Fork me on GitHub
#reagent
<
2022-08-05
>
ns18:08:22

Does Reagent work with React version 18? On their github it says "Note: Reagent is tested against React 17, but should be compatible with other versions." Does that mean versions below only or versions below and above? I've managed to include 18.2.0 and make it run, seems to work, but I'm wondering if there are any issues that I'm not aware of?

ns18:08:00

Also, I use shadow, but every time I release I see "this page is using development version of React" which, again, I don't know if it's an issue or not.

annarcana18:08:39

my experience of reagent is it's quite conservative in its use of the underlying React internals, so I've almost never had any issues, but then my reagent projects don't tend to make much use of vanilla React libraries

ns18:08:57

so you too are using 18?

annarcana18:08:05

I'm currently not on any reagent projects, just speaking from general experience. I wouldn't worry about it unless something does break.

athomasoriginal18:08:35

It's unclear to me if React 18 and Reagent work together as of yet. What I do is track the open issues like: https://github.com/reagent-project/reagent/issues/500 - nothing about that ticket suggests it doesn't work, but if you're conservative in the versions you adopt you may want to see the above resolved.

Chase18:08:20

I have only been doing basic stuff with it but I haven't noticed anything not working. You do get this warning in your console:

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: 

annarcana18:08:02

react loves to give warnings about everything all the time 😅

ns18:08:12

Yeah, got the warning despite using createRoot, other than that haven't experienced any issues.

souenzzo16:08:25

Is possible to use react 18 with reagent You just need to switch from reagent.dom/render to "react-dom/client" "raw" methods. https://github.com/souenzzo/atemoia/blob/main/src/atemoia/client.cljs#L73

👍 4
William Baumgartner19:08:37

Hi everyone, I work for a media/streaming company in Brazil called https://www.brasilparalelo.com.br/. I’d like to know whether one of you [reagent core devs] is interested in giving our tech team a talk/presentation about reagent. It doesn’t need to be long: 15-30min would be great. With some time [~10min] for QA would also be greatly appreciated. For context we’re already using clojure in the backend but now we’re adopting clojurescript in the frontend as well. And we’re in the process of migrating all of our apps from a typical react setup to reagent+re-frame. I hope this is the right place to make such request, if not please let me know where I could reach out to those who might me interested. Thank you clojurians. Cheers.