Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fchristenson/generic-components


https://github.com/fchristenson/generic-components

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# How to build reusable components in React

## What we will cover

- A mental mistake some make when creating components
- Why I believe it happens
- How to fix it

## Notes

One of the most common things I have noticed when working with developers in frontend is
that when they are designing their components their component often turns out as a "one
of solution".

This means that the component can not be directly reused without changing the code.

I believe this often happens because they start thinking about the data they want
to show before they make the visual component.

A mental trick I use to help me design more generic components is to always think from
the perspective of the component and not about my data.