Skip to content

nitinkarthy/react-composition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-composition

This is a repo to demonstrate the use of composition when designing React components. There are 3 approaches presented

Approach Advantages Disadvantages
Specialized Easiest way to design while learning React Prop drilling through components that don't care about props
Composed Avoids prop drilling, improved readability - the state variable definition is closer to the usage of it 🙅🏽‍♂️
Lifted Reduced number of props to be drilled down Not as readable as composed approach

This repo is to supplement the blog article on the same.

About

Refactoring a specialized component hierarchy into a composed style.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published