DEV Community

Adam Crockett πŸŒ€
Adam Crockett πŸŒ€

Posted on

React, where are all the plugins at?

In Vue you have community created plugins to extend Vues functionality. What is the equivalent in React?

This is a legit question from a library author wanting to cross port.

Top comments (5)

Collapse
 
juliang profile image
Julian Garamendy

As far as I know, since React is not really a framework, but a library πŸ™„, you don't really need a plugin system to extend React.

There's a myriad of npm packages with "react" in the name. They're just not plugins.

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

Interesting, I didn't expect that πŸ˜…

Collapse
 
vonheikemen profile image
Heiker

I think the closest thing right now are "Hooks". In theory they are "just functions". In practice they are functions that follow some rules and that you put in a component. React just knows when to call them.

The second closest I guess is "High Order Components". That is a component that controls another component.

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€ • Edited

Thank you Heiker, I have a feeling I need to write a hook but would you mind taking a look at my library and giving your opinion?

npmjs.com/package/reactive-css-pro...

Sounds like I need to wrap the library in a hook then publish that with a react- prefix

Collapse
 
vonheikemen profile image
Heiker

Yes. I think hooks are a good fit for this.