The Trigger Element pattern
August 19, 2019 - 6min read
If you have done some projects with ReactJS, you have probably encountered very repetitive code snippets.
For instance, writing a toggle to open a Modal component used to look like this : A few months ago, hooks came out and reduced slightly the…