angular.js - I would like to ask you about angular and react.
習慣沉默
習慣沉默 2017-05-15 17:00:03
0
2
525

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

習慣沉默
習慣沉默

reply all(2)
漂亮男人

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

Ty80

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template