{"id":27147834,"url":"https://github.com/manineedtosleep/lifting-state-up-react","last_synced_at":"2026-05-09T10:08:43.555Z","repository":{"id":283915936,"uuid":"934992768","full_name":"ManINeedToSleep/Lifting-State-Up-React","owner":"ManINeedToSleep","description":"A simple React application demonstrating state sharing between components using the \"lifting state up\" pattern.","archived":false,"fork":false,"pushed_at":"2025-03-23T01:33:27.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T02:26:33.759Z","etag":null,"topics":["component-communication","hooks","react","react19","state-management","typescript","usestate","vite"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/ManINeedToSleep.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-18T18:22:25.000Z","updated_at":"2025-03-23T01:34:12.000Z","dependencies_parsed_at":"2025-03-23T02:26:36.453Z","dependency_job_id":null,"html_url":"https://github.com/ManINeedToSleep/Lifting-State-Up-React","commit_stats":null,"previous_names":["manineedtosleep/lifting-state-up-react"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManINeedToSleep%2FLifting-State-Up-React","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManINeedToSleep%2FLifting-State-Up-React/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManINeedToSleep%2FLifting-State-Up-React/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManINeedToSleep%2FLifting-State-Up-React/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManINeedToSleep","download_url":"https://codeload.github.com/ManINeedToSleep/Lifting-State-Up-React/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838415,"owners_count":21004576,"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":["component-communication","hooks","react","react19","state-management","typescript","usestate","vite"],"created_at":"2025-04-08T11:51:20.757Z","updated_at":"2026-05-09T10:08:38.519Z","avatar_url":"https://github.com/ManINeedToSleep.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lifting State Up in React\n\n\u003e A simple React application demonstrating state sharing between components using the \"lifting state up\" pattern.\n\n**Topics:** react typescript vite state-management hooks useState component-communication react19\n\nThis React application demonstrates the concept of \"lifting state up\" in React - a pattern where state is moved from child components to their parent to share state between multiple components.\n\n## Project Overview\n\nThe application contains a simple counter example where:\n- State is managed in the parent `App` component \n- Two instances of the `Counter` component share the same state\n- When one counter is incremented or decremented, the other counter reflects the same value\n\n## Features\n\n- Built with React 19 and TypeScript\n- Uses React's useState hook for state management\n- Demonstrates the key React concept of lifting state up\n- Modern Vite-based build system\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (version 16 or higher recommended)\n- npm or yarn\n\n### Installation\n\n1. Clone the repository\n```bash\ngit clone [repository-url]\n```\n\n2. Install dependencies\n```bash\nnpm install\n```\n\n3. Run the development server\n```bash\nnpm run dev\n```\n\n## Available Scripts\n\n- `npm run dev` - Start the development server\n- `npm run build` - Build for production\n- `npm run lint` - Run ESLint\n- `npm run preview` - Preview the production build\n\n## Technologies Used\n\n- React 19\n- TypeScript\n- Vite\n- ESLint\n\n## Project Structure\n\n```\n/\n├── public/            # Static assets\n├── src/\n│   ├── components/    # Reusable components\n│   │   └── Counter.tsx\n│   ├── App.tsx        # Main application component\n│   └── main.tsx       # Application entry point\n└── package.json       # Project dependencies and scripts\n```\n\n## Learning Resources\n\nFor more information on \"lifting state up\" in React, check:\n- [React Documentation on Sharing State Between Components](https://react.dev/learn/sharing-state-between-components)\n\n# React + TypeScript + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n\n## Expanding the ESLint configuration\n\nIf you are developing a production application, we recommend updating the configuration to enable type aware lint rules:\n\n- Configure the top-level `parserOptions` property like this:\n\n```js\nexport default tseslint.config({\n  languageOptions: {\n    // other options...\n    parserOptions: {\n      project: ['./tsconfig.node.json', './tsconfig.app.json'],\n      tsconfigRootDir: import.meta.dirname,\n    },\n  },\n})\n```\n\n- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`\n- Optionally add `...tseslint.configs.stylisticTypeChecked`\n- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:\n\n```js\n// eslint.config.js\nimport react from 'eslint-plugin-react'\n\nexport default tseslint.config({\n  // Set the react version\n  settings: { react: { version: '18.3' } },\n  plugins: {\n    // Add the react plugin\n    react,\n  },\n  rules: {\n    // other rules...\n    // Enable its recommended rules\n    ...react.configs.recommended.rules,\n    ...react.configs['jsx-runtime'].rules,\n  },\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanineedtosleep%2Flifting-state-up-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanineedtosleep%2Flifting-state-up-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanineedtosleep%2Flifting-state-up-react/lists"}