[ReactJS] Training with Velib API in Paris area
- ReactJS
- React Google Maps (with Clusters)
- Bulma CSS
- Webpack
- Async fetch w/ Promise
###/!\ This repo does not use Redux for state management.
However, it uses a 3-level bidirectional data flow:
- The <Stations> component is a container wrapping two components: <Map> and <StationCard>.
- <Stations> contains the
handleMarkerClick
function which is passed to the <Map> component asprops
, which passes it to the <GoogleMapWrapper> component, which also passes it to each <Marker> component created. - Then, when a user clicks on a marker, the
handleMarkerClick
function (passed through the nested Components above asprops
) is called with the marker as argument, allowing the <Stations> container to retrieve the station selected (marker clicked) and set it in itsstate
. - The selected station set in the
state
is passed to the <StationCard> component, which can then display all the informations about the station.