A way of simplifying frontend logic
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
This repository is dedicated to resolving some of the issues I've seen in my time writing thousands of React components, both alone and on teams.
In particular, I've noticed that many engineers struggle with separation of concerns on the frontend, or even decide that all logic - complicated or otherwise - belongs in the Component itself.
The examples and patterning in this repository is an attempt to bring simple code separation into the React community.
To get a local copy up and running follow these simple steps.
npm i @enduranceidehen/behavior
Please refer to the Documentation
- Don't extend or inherit from behaviors.
- Problem: Creating an inheritance hierachy can come with a whole host of complexity problems.
- Try this: Consider Behaviors as place to separate view code (which can live in the React Component) from logic, which the Behavior exists to encapsulate.
- If you have common functionality that you want to reuse, turn that functionality into a separate function that you reuse in the behavior in service to the component.
- Make your behaviors as simple as you can possibly make it
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Your Name - Endurance Idehen - [email protected]
Project Link: https://github.com/endurance/behavior