Reactjs + Angular + Babel

Asked

Viewed 104 times

0

Good morning I need to use Reactjs in a project that I already use Angularjs. I was able to do the integration, but without using Babel, that is, I was only able to make Angular and Reactjs communicate through pure React. Someone could tell me how I can do this integration and use Babel???

  • Have you looked at this lib? https://github.com/ngReact/ngReact

  • Yeah, but the staff won’t use. :(

  • I understood, in my opinion React and Angular are for different purposes, I do not see much sense in using the two together.

  • And worse is that this library does not render Babel

1 answer

1

Why not include the Babel script like this (after including React and React-dom):

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>

And define the scripts that use React with the attribute text/babel:

<script type="text/babel" src="seu_react.js"></script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.