Skip to content

React from angularjs best practices

Adam Pelle edited this page Feb 20, 2020 · 4 revisions

Best Practices

We are using react2angular lib which can expose a react component to an angular counterpart. like <StepItem step={...} /> -> <r-step-item step="step"> so we can use them in angular templates like any other directives (note it's gonna be angular component not a directive!). Though it seems very neat and easy, we need to be aware of couple practices.

Exposing typescript services to angular

With webpack we can simply export/import components or functions like this:

Clone this wiki locally