{"id":22788958,"url":"https://github.com/ripeworks/react-root","last_synced_at":"2025-04-16T01:37:37.122Z","repository":{"id":57343681,"uuid":"49646587","full_name":"ripeworks/react-root","owner":"ripeworks","description":"\u003cRoot /\u003e that bootstraps react, redux, react-router, webpack, devServer, etc, etc","archived":false,"fork":false,"pushed_at":"2016-05-19T13:14:28.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T03:32:09.807Z","etag":null,"topics":[],"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/ripeworks.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":"2016-01-14T12:41:42.000Z","updated_at":"2016-05-18T02:41:51.000Z","dependencies_parsed_at":"2022-09-12T06:50:54.765Z","dependency_job_id":null,"html_url":"https://github.com/ripeworks/react-root","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Freact-root","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Freact-root/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Freact-root/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripeworks%2Freact-root/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ripeworks","download_url":"https://codeload.github.com/ripeworks/react-root/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602302,"owners_count":21131615,"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":"2024-12-12T01:39:09.367Z","updated_at":"2025-04-16T01:37:37.100Z","avatar_url":"https://github.com/ripeworks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React \u0026lt;Root /\u0026gt;\n\n\u003e Because I don't want to deal with boilerplates and starters.\n\n[![npm version](https://badge.fury.io/js/react-root.svg)](https://badge.fury.io/js/react-root)\n\n## Install\n\n```\n$ npm install --save react-root\n```\n\n## Usage\n\n```js\nimport React from 'react'\nimport { render } from 'react-dom'\nimport { Root, createStore } from 'react-root'\n\nconst middleware = [\n  // any redux middleware you need\n]\n\nconst reducers = {\n  // object of your reducers\n}\n\nconst store = createStore(middleware, reducers)\n\nconst routes = \u003cRoute path='/' component={App}\u003e\n  \u003cRoute path='home' component={Home} /\u003e\n\u003c/Route\u003e\n\nrender(\n  \u003cRoot routes={routes} store={store} /\u003e,\n  document.getElementById('app')\n)\n\n```\n\nSee the [example](example) to see how easy it is to get started!\n\n### Redux Devtools\n\nInstall the [Redux Devtools browser extension](https://github.com/zalmoxisus/redux-devtools-extension).\n\n### Hot reloading your reducers\n\nIf you need to hot reload reducers in development, you can pass a function as the 4th parameter to `creatStore` in order to get the store instance so you can call `replaceReducer`. This function is only ever called if `module.hot === true`:\n\n```js\nconst store = createStore(middleware, reducers, storeEnhancers, store =\u003e {\n  module.hot.accept('./reducers', () =\u003e {\n    store.replaceReducer(require('./reducers').default)\n  })\n})\n```\n\n\n## What's inside?\n\n* redux\n* react-redux\n* react-router\n* react-router-redux\n\n## Related Projects\n\n* [superdevpack](https://github.com/ripeworks/superdevpack) Use react-root and superdevpack together for the quickest way to get started on a React project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripeworks%2Freact-root","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fripeworks%2Freact-root","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripeworks%2Freact-root/lists"}