#Mixing Angular and React together

5 messages · Page 1 of 1 (latest)

serene patio
#

Hello!
Did someone managed to mix Angular (via AnalogJS integration) and React together?
I'm getting errors like this:

Unable to render HelloAngularComponent because it is undefined!
Did you forget to import the component or is it possible there is a typo?

or

Unable to render HelloReact because it is undefined!
Did you forget to import the component or is it possible there is a typo?

Thanks!

abstract iris
#

Hey there! Gunna need more info to help you out! Do you have any code you can show? What exactly are you trying to do?

serene patio
#

Sure! I'll make an example repository with all commands executed

serene patio
#

Ok so, by bootstrapping a new project, I finally figured out what the problem was.

It's not just a question of mixing Angular and React (using the astro add utility), but also Vue.
Indeed, astro add vue proposes to modify "jsx" : "preserve" on the tsconfig.json, causing the problem mentioned.

I don't know whether this problem is expected or not, but doesn't it mean that it's impossible to mix React JSX with Vue JSX?

abstract iris
#

That's very interesting! That's a great catch!

So on the mixing JSX when you initialise the React integration you can pass a path specifically for the react files and then another for the Vue ones I'd imagine! I didn't think Vue used JSX though? But yeah you can pass includes to the react integration