You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, react-aop is unable to retrieve component instance. Tried with ref , ReactTestUtilities, and even reactElement but in vain. Because of this limitation, the current version limits you to be able add advice only on react component methods that doesn't reference to same component, this.
The work around currently implemented is by putting pointcut only in to the method that doesn't has reference to itself(this). In case you only have method with this, just need to create new method with no implementation and make it call from your originally intended method and make this new method your hook. For instance:
Googling about 'React cross-cutting concerns' I found this repo. Congrats, this is pretty nice. You have create an specific AOP solution for React. I don't have enough knowledge of React to indentify ccc far away from Logs or Ajax requests, but specific problems that AOP can solve in flux arquitectures (react related)
I'm looking for help to make examples of ccc problems solved by aop.
Please take a look over my repository. I wish colaborate with you to bring the benefits of AOP to React :)
Currently, react-aop is unable to retrieve component instance. Tried with ref , ReactTestUtilities, and even reactElement but in vain. Because of this limitation, the current version limits you to be able add advice only on react component methods that doesn't reference to same component, this.
The work around currently implemented is by putting pointcut only in to the method that doesn't has reference to itself(this). In case you only have method with this, just need to create new method with no implementation and make it call from your originally intended method and make this new method your hook. For instance:
Original method in specification:
And create the pointCut on _aopHook.
The text was updated successfully, but these errors were encountered: