Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

How can I build an Angular like Attribute Directive using a custom React Hook? #556

Open
httpJunkie opened this issue Jan 23, 2019 · 0 comments
Labels
code-help StackOverflow-like questions

Comments

@httpJunkie
Copy link

httpJunkie commented Jan 23, 2019

I was listening to the React Podcast about Hooks and this idea came up for a brief second and got me thinking, However, I am not well versed enough in React to know how to approach this idea.

The highlight feature that Angular uses as their demo for Attribute Directives would be a simple idea to try and implement: https://angular.io/guide/attribute-directives#attribute-directives

Finally are there any cons to introducing attribute directives to React? Is there a reason that this is not something we do often? Am I missing something in React that makes this easy but it's just called something else other than directives?

@joeycozza joeycozza added the code-help StackOverflow-like questions label Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-help StackOverflow-like questions
Projects
None yet
Development

No branches or pull requests

2 participants