Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Awesome response - are you able to give me an example of what you mean "wrap third party components"?

Thanks :)



view as:

I've done this in a project recently when I was trying out different third party autocomplete components.

I had my own autocomplete component that I would use wherever I needed an autocomplete, and that component would render the third party autocomplete and supply it with the props it required. When I needed to switch out which third party component I was using, I only had to change code in one place, instead of changing it everywhere I was using autocomplete.


Legal | privacy