search

Home  >  Q&A  >  body text

angular.js - I would like to ask you about angular and react.

I would like to ask you about angular and react.

In angular.js, I can apply multiple restrict: A directives to the same tag. Is there a similar equivalent application method in react?

I searched on the Internet and everyone said that a component must be written in react. In this case, if you want to complete the operation of angular.js, how should you do it? Or is there something I don’t know? Can such an operation be accomplished?

For example, I wrote two directives, one draggable and one scaleable. In angular, just bind events directly to the links of the two directives.

In react, do we need to nest two levels of components?

Please give me some advice

習慣沉默習慣沉默2784 days ago533

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-05-15 17:02:03

    If there is component inheritance in react, this function may be possible. . .

    reply
    0
  • PHP中文网

    PHP中文网2017-05-15 17:02:03

    It can be achieved using the "nested two-layer component" mentioned by the questioner. This should also be the standard implementation method in react.
    This is called High-order Components

    reply
    0
  • Cancelreply