Skip to content

andreagiassi/react-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Context

Overview

This is a small project to explain how to propagate variables using the context instead props with the Reactjs javascript framework.

Context is designed to share data that can be considered global for a tree of React components, such as the current authenticated user, theme, or preferred language.

In this small project I've shared an userId and a security token across the DOM tree using a UserProvider.

Getting Started

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

Author

This project has been created in February 2020 by Andrea Giassi.

Andrea he's an italian Agile professional and Software Engineer actives in web systems and services. Since 2002, Andrea is working in the IT market for several different companies and start ups and it has contributed to the success of several solutions and products.

About me: https://www.linkedin.com/in/andreagiassi/

Please support this open source with a small donation here:

Buy Me A Coffee