{"id":22039425,"url":"https://github.com/mpolinowski/react-typescript","last_synced_at":"2026-04-05T23:03:55.424Z","repository":{"id":214941349,"uuid":"735992721","full_name":"mpolinowski/react-typescript","owner":"mpolinowski","description":"Why is Typescript always yelling at me... And how can I make it stop.","archived":false,"fork":false,"pushed_at":"2024-01-20T07:49:52.000Z","size":4862,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T19:17:32.356Z","etag":null,"topics":["hls-stream","json-api","react-form-hook","react-redux-toolkit","react-router","reactjs","typescript-react","videojs"],"latest_commit_sha":null,"homepage":"https://mpolinowski.github.io/docs/Development/Javascript/2023-12-14-reactjs-typescript-2023/2023-12-14","language":"TypeScript","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/mpolinowski.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":"2023-12-26T17:10:09.000Z","updated_at":"2024-01-01T08:49:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"aec51bd3-0611-4f1c-afef-e1c50671a17a","html_url":"https://github.com/mpolinowski/react-typescript","commit_stats":null,"previous_names":["mpolinowski/react-typescript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Freact-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Freact-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Freact-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Freact-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpolinowski","download_url":"https://codeload.github.com/mpolinowski/react-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245104529,"owners_count":20561380,"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":["hls-stream","json-api","react-form-hook","react-redux-toolkit","react-router","reactjs","typescript-react","videojs"],"created_at":"2024-11-30T11:10:43.197Z","updated_at":"2025-12-30T21:28:16.834Z","avatar_url":"https://github.com/mpolinowski.png","language":"TypeScript","readme":"# React Typescript UI\n\n* [Step-by-Step Setup Guide](https://mpolinowski.github.io/docs/Development/Javascript/2023-12-14-reactjs-typescript-2023/2023-12-14)\n\n\u003c!-- TOC --\u003e\n\n- [React Typescript UI](#react-typescript-ui)\n  - [Vite.js](#vitejs)\n    - [Routing and State Management](#routing-and-state-management)\n    - [Frontend Components and Styling](#frontend-components-and-styling)\n  - [Features](#features)\n    - [Mocked Backend Login](#mocked-backend-login)\n    - [HLS Live Streaming](#hls-live-streaming)\n    - [JSON Rest APIs](#json-rest-apis)\n    - [Dark/Light Theme](#darklight-theme)\n    - [Form Validation](#form-validation)\n    - [Displaying Video Files](#displaying-video-files)\n\n\u003c!-- /TOC --\u003e\n\n\n## Vite.js\n\nScaffold your React Typescript app with [Vite.js](https://vitejs.dev/):\n\n```bash\nnpm create vite@latest react-ts --template react-swc-ts\n```\n\n\u003e Alternatives: Vanilla javascript and Typescript SSR:\n\n```bash\nnpm create vite@latest react-js --template react-swc\n\nnpm create vite@latest react-ts-ssr\n✔ Select a template: › ssr-react\n✔ Select a variant: › TypeScript + SWC\n```\n\n\n### Routing and State Management\n\n[React-Router](https://reactrouter.com/en/main) and [React-Redux](https://react-redux.js.org/):\n\n```bash\nnpm install react-router-dom @reduxjs/toolkit react-hook-form react-redux\n```\n\n\n### Frontend Components and Styling\n\n[ShadCN UI](https://ui.shadcn.com/) and [Tailwind CSS](https://tailwindcss.com/)\n\n```bash\nnpm install -D tailwindcss postcss autoprefixer\n```\n\n_tsconfig.json_\n\n```json\n{\n  \"compilerOptions\": {\n    // ...\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\n        \"./src/*\"\n      ]\n    }\n    // ...\n  }\n}\n\n```\n\n```bash\nnpm i -D @types/node\n```\n\n_vite.config.ts_\n\n\n```ts\nimport path from \"path\"\nimport react from \"@vitejs/plugin-react\"\nimport { defineConfig } from \"vite\"\n\nexport default defineConfig({\n  plugins: [react()],\n  resolve: {\n    alias: {\n      \"@\": path.resolve(__dirname, \"./src\"),\n    },\n  },\n})\n```\n\n\n```bash\nnpx shadcn-ui@latest init\n\n✔ Would you like to use TypeScript (recommended)? … yes\n✔ Which style would you like to use? › New York\n✔ Which color would you like to use as base color? › Zinc\n✔ Where is your global CSS file? … src/styles/global.css\n✔ Would you like to use CSS variables for colors? … yes\n✔ Are you using a custom tailwind prefix eg. tw-? (Leave blank if not) …\n✔ Where is your tailwind.config.js located? … tailwind.config.js\n✔ Configure the import alias for components: … @/components\n✔ Configure the import alias for utils: … @/lib/utils\n✔ Are you using React Server Components? … no\n✔ Write configuration to components.json. Proceed? … yes\n```\n\n```bash\nnpx shadcn-ui@latest add \u003ccomponent name\u003e\n```\n\n```ts\nimport { Component } from \"@/components/ui/\u003ccomponent name\u003e\"\n```\n\n\n![Vite.js React Typescript SSR](./react-ts-ssr.png)\n\n\n\n## Features\n\n### Mocked Backend Login\n\nLogin using Redux state to block access to components based on auth level:\n\n\n![React Typescript UI](./assets/features_01.png)\n\n\n### HLS Live Streaming\n\nUsing `hls.js` to access `*.m3u8` video streams:\n\n\n![React Typescript UI](./assets/features_02.png)\n\n\n![React Typescript UI](./assets/features_03.png)\n\n\n### JSON Rest APIs\n\nRetrieving and displaying structured data from HTTP APIs:\n\n\n![React Typescript UI](./assets/features_04.png)\n\n\n![React Typescript UI](./assets/features_05.png)\n\n\nImplement a search function by filtering the JSON data:\n\n\n![React Typescript UI](./assets/features_08.png)\n\n\n### Dark/Light Theme\n\nUsing `shadcn-ui` to implement a day/night theme toggle:\n\n\n![React Typescript UI](./assets/features_09.png)\n\n\n### Form Validation\n\nUsing `react-hook-form` for form validation:\n\n\n![React Typescript UI](./assets/features_07.png)\n\n\n### Displaying Video Files\n\nPlay MP4 h.264 video files using `video.js`:\n\n\n![React Typescript UI](./assets/features_06.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpolinowski%2Freact-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpolinowski%2Freact-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpolinowski%2Freact-typescript/lists"}