{"id":26926615,"url":"https://github.com/skyfi/react-router-redux","last_synced_at":"2025-04-02T03:34:39.746Z","repository":{"id":57343922,"uuid":"111666533","full_name":"skyFi/react-router-redux","owner":"skyFi","description":"connect react router 4.x and redux.","archived":false,"fork":false,"pushed_at":"2017-12-06T08:43:59.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-09T21:19:39.189Z","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/skyFi.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":"2017-11-22T09:57:11.000Z","updated_at":"2018-12-28T15:51:47.000Z","dependencies_parsed_at":"2022-09-12T06:51:04.361Z","dependency_job_id":null,"html_url":"https://github.com/skyFi/react-router-redux","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/skyFi%2Freact-router-redux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyFi%2Freact-router-redux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyFi%2Freact-router-redux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyFi%2Freact-router-redux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyFi","download_url":"https://codeload.github.com/skyFi/react-router-redux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246752353,"owners_count":20827983,"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-04-02T03:34:39.677Z","updated_at":"2025-04-02T03:34:39.740Z","avatar_url":"https://github.com/skyFi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-router-redux\nconnect react router 4.x and redux.\n\n## Install\n\n```JavaScript\nnpm install react-router4-redux --save\n\n//or \nyarn add react-router4-redux\n```\n\n## Why \u0026\u0026 Usage\n\n* normal\n\nuse redux before:\n\n```JavaScript\nimport { connect } from 'react-redux';\nexport default connect(mapStateToProps)(Something)\n```\n\nafter using react-router 4.x:\n\n```JavaScript\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom'\nexport default withRouter(connect(mapStateToProps)(Something))\n```\n\noooh that`s so tedious.\n\nbut now, you can do just simple redux:\n\n```JavaScript\nimport connect from 'react-router4-redux';\nexport default connect(mapStateToProps)(Something)\n```\n\n* use for connect mixins:\n\n```JavaScript\nimport connect from 'react-router4-redux';\nexport default connect(mapStateToProps)(Something, SomeMixin1, SomeMixin2, SomeMixin3 /*, ....mixins*/)\n```\n\n* add fetchData func\n\nasync fetchData({ dispatch, match }) {\n  await dispatch(someAction());\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfi%2Freact-router-redux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyfi%2Freact-router-redux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfi%2Freact-router-redux/lists"}