{"id":24771557,"url":"https://github.com/ziyi2/react-start-kit","last_synced_at":"2025-03-23T20:28:08.219Z","repository":{"id":98890492,"uuid":"70400916","full_name":"ziyi2/react-start-kit","owner":"ziyi2","description":"Tell you how to start with react.  -2016/10/19","archived":false,"fork":false,"pushed_at":"2016-10-20T00:40:23.000Z","size":600,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T04:01:34.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ziyi2.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":"2016-10-09T12:15:19.000Z","updated_at":"2016-10-19T03:15:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c2a8eef-aa16-4a8a-99ef-2291e5d21f60","html_url":"https://github.com/ziyi2/react-start-kit","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/ziyi2%2Freact-start-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziyi2%2Freact-start-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziyi2%2Freact-start-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziyi2%2Freact-start-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziyi2","download_url":"https://codeload.github.com/ziyi2/react-start-kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245164221,"owners_count":20571086,"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":[],"created_at":"2025-01-29T04:00:58.175Z","updated_at":"2025-03-23T20:28:08.206Z","avatar_url":"https://github.com/ziyi2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-start-kit\n\nreact-start-kit是一个以react为起步的一整套客户端实现方案, 包括了webpack打包,开发环境启动服务工具webpack-dev-server,react状态管理库react-redux,react路由解决方案react-router,服务器端测试框架mocha以及客户端测试管理工具karma.\n该项目采用ES6语法以及部分ES7语法,旨在对react以及react的周边库和工具有一个初步的了解.\n\n\n## 起步\n\n### Webpack\n\n为了使前端代码能够支持ES6,部分ES7以及支持JSX语法,就需要使用webpack自动化工具对代码进行转码,[Webpack](https://github.com/ziyi2/react-start-kit/tree/master/Webpack)主要讲述如何开始起步一个react项目.\n\n### Server\n\n当我们在编写代码的时候,当然不希望编写了一小段代码想在浏览器端查看效果时,还需要每次手动使用webpack进行打包,[webpack-dev-server](https://github.com/ziyi2/react-start-kit/tree/master/Server)能够给我们启动一个开发环境的express服务,并监听文件的变化,从而实现自动打包功能.并且该服务的热部署功能可以使我们不用刷新浏览器便可看到我们代码生效的结果.\n\n需要注意的是该服务只是用来让前端开发环境更方便,在真正的生产环境当然不需要再使用它了(而是部署一个我们自己的express服务).\n\n### React-Redux\n\n当项目组织过大,react的状态state会变得难以管理,甚至渲染出现问题时很可能不清楚是哪个state出了问题,而[react-redux](https://github.com/ziyi2/react-start-kit/tree/master/React-Redux)可以很好的帮助我们管理state,同时它还有一个重要的特点是可以同构应用,即让state在服务端和客户端同步管理.\n\n\n### React-Router\n\n[react-router](https://github.com/ziyi2/react-start-kit/tree/master/React-Router)是react路由解决方案,它可以保持UI和URL同步,需要注意的是这在单页应用中非常有用,它看起来我们的单页应用变得像多页应用一样丰富多彩.\n\n### Mocha\n\n[Mocha](https://github.com/ziyi2/react-start-kit/tree/master/Mocha)是运行在Node端的测试框架,可以用来对JavaScript代码进行单元测试,由于这里并没有服务端代码,所以这里只是讲述如何使用它,以及后面为客户端测试做预热.\n\n\n### Karma\n\n[Karma](https://github.com/ziyi2/react-start-kit/tree/master/Karma)是提供客户端测试环境的测试管理工具,可以配合Mocha等测试框架使用,这里主要讲述如何利用Karma进行前端代码的单元测试.\n\n\n\n## 链接汇总\n\n- [Webpack](https://github.com/ziyi2/react-start-kit/tree/master/Webpack)\n- [Server](https://github.com/ziyi2/react-start-kit/tree/master/Server)\n- [React-Redux](https://github.com/ziyi2/react-start-kit/tree/master/React-Redux)\n- [React-Router](https://github.com/ziyi2/react-start-kit/tree/master/React-Router)\n- [Mocha](https://github.com/ziyi2/react-start-kit/tree/master/Mocha)\n- [Karma](https://github.com/ziyi2/react-start-kit/tree/master/Karma)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziyi2%2Freact-start-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziyi2%2Freact-start-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziyi2%2Freact-start-kit/lists"}