{"id":20196345,"url":"https://github.com/gpavanb1/most-basic-react-context","last_synced_at":"2025-03-03T08:14:08.705Z","repository":{"id":44592835,"uuid":"258531900","full_name":"gpavanb1/Most-Basic-React-Context","owner":"gpavanb1","description":"Simplest Context with Local and Global Counter","archived":false,"fork":false,"pushed_at":"2020-04-24T14:22:00.000Z","size":301,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T19:39:32.049Z","etag":null,"topics":["javascript","react","react-context","reactjs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpavanb1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-24T14:16:05.000Z","updated_at":"2022-07-11T18:54:16.000Z","dependencies_parsed_at":"2022-09-15T15:50:33.411Z","dependency_job_id":null,"html_url":"https://github.com/gpavanb1/Most-Basic-React-Context","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FMost-Basic-React-Context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FMost-Basic-React-Context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FMost-Basic-React-Context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpavanb1%2FMost-Basic-React-Context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpavanb1","download_url":"https://codeload.github.com/gpavanb1/Most-Basic-React-Context/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629769,"owners_count":19993710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","react","react-context","reactjs"],"created_at":"2024-11-14T04:23:25.679Z","updated_at":"2025-03-03T08:14:08.684Z","avatar_url":"https://github.com/gpavanb1.png","language":"JavaScript","readme":"# Most-Basic-React-Context\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\nAlso, have a look at the [React-Redux](https://react-redux.js.org/) version of the counter  - [Most-Basic-React-Redux](https://github.com/gpavanb1/Most-Basic-React-Redux)\n\n![Made with Love in India](https://madewithlove.org.in/badge.svg)\n\n## How To Run\n\nIn the project directory, using [`npm`](https://nodejs.org/en/), you can run:\n\n### `npm start`\n\nRuns the app in the development mode.\u003cbr /\u003e\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\u003cbr /\u003e\n\n## Sample\n\n![](./sample/demo.gif)\n\n## Contents\n\nRelevant code is present in [App.js](./src/App.js). The code is divided into 3 sections and illustrates the core patterns of React's Context API.\n\n* Context: The score along with increment and decrement functions are going to be stored in __ScoreContext__ in [context.js](./src/context.js)\n* Two main components\n\t- __ScoreBoard__ : Stateless and displays main count stored in context, accessed through consumer and then looking at `score` property.\n\t- __Controller__ : Contains local states to track number of increments and decrements. Also, increment and decrement functions for global state are present in this. They are initialized in the `App` component and appropriately modify its state.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpavanb1%2Fmost-basic-react-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpavanb1%2Fmost-basic-react-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpavanb1%2Fmost-basic-react-context/lists"}