Skip to content

Knowing your weight on some potentially habitable exoplanets (kg/lbs) -render props example-

Notifications You must be signed in to change notification settings

emilioponce/your-weight-on-habitable-exoplanets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Your weight on some potentially habitable exoplanets

This project implements React's Render Props pattern (children as a function approach), trying to give you a good example of its value.

Also gives you an easy way to obtain your weight in your favorite exoplanet, just for free, you know..

Render Props applied

In this example we want to know our hypothetical weight in some known exoplanets. The piece of info we need to share between components is our weight on Earth (input value), as every planet knows how to calculate its equivalent weight in its particular conditions.

In this implementation, you are going to find a 'Weight' component that's in charge of store the weight value in his own state, and an 'APP' component that invokes 'Weight' applying render props in order to obtain the Weight state value and pass it as a property to the different exoplanets.

In order to maintain simplicity, Exoplanet components remain fully independent, even sharing a lot of their code.

Stack

This project was bootstrapped with CRA.

  • React
  • Css Modules
  • Webpack

Install instructions

git clone https://github.com/emilioponce/your-weight-on-habitable-exoplanets.git
yarn
yarn start

About

Knowing your weight on some potentially habitable exoplanets (kg/lbs) -render props example-

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published