2

I have a working project on AngularJS and I have a problem rendering. I need to render many elements (1000+) in one page and very fast. To solve this problem, I decided to use ReactJS. But... I have these elements

<tr data-ng-repeat="user in users>
  <td><span data-my-directive="user.data"></span></td>
</tr>

How can I render this on ReactJS. How can I run my angular directive? I have many Angular directives, how can I make angular friends with ReactJS?

Thanks

1 Answer 1

1

Yes you can use Angular Directives from inside React.

You can call React.RenderComponent from within your angular directive. A detailed example is presented here.

However, the style of code in the example would quickly lead to a mess of a frankenstine application framework. If your angular application is mostly in Angular, I would suggest wrapping your react functionality inside it's own module and exposing the required features from services to keep things at least somewhat compartmentalised.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.