1.1.0 • Published 5 years ago
@epranka/react-collector v1.1.0
@epranka/react-collector
Simple and flexible way to reference react components
What it is
react-collector lets you to reference multiple react components along the whole tree. Using the React.createRef() or other standard method you can reference only one component, but problem occurs when you want to reference array of components, for example rendered components with map(). But this is just one scenario out of many, so check it out the full power.
See the Quick start guide for more details.
Features
- useCollector for new React Hook API
- Reference deeply nested components using the React Context API
- Reference array of components
- Reference different kind of components to their namespaces (arrays)
- Decorator @collect to simplify and shorten code writing.
- Only one dependency (hoist-non-react-statics)
- Typescripted
Examples
Checkout the examples of usage in examples page
API Reference
Checkout the api reference of detail usage information
Contributing
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
Author
Special thanks to Vipin Kumar Rawat
If you have questions, feel free to contact
- Edvinas Pranka
- Twitter: @epranka
- Email: epranka@gmail.com
- Website: www.kodmina.lt