{"id":21629227,"url":"https://github.com/diegothucao/react-native-javascript-redux-saga-template","last_synced_at":"2025-10-13T01:46:08.833Z","repository":{"id":123749621,"uuid":"181111028","full_name":"diegothucao/react-native-javascript-redux-saga-template","owner":"diegothucao","description":"This is an essential example to build react-native app using Javascript and Redux Saga","archived":false,"fork":false,"pushed_at":"2019-06-24T10:38:06.000Z","size":177,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T14:12:45.864Z","etag":null,"topics":["basic","best-first-search","best-practices","boilerplate","boilerplate-template","es6","essential","examples","javascript","react-js","react-native","redux","redux-react","redux-saga","template-project"],"latest_commit_sha":null,"homepage":"http://www.linkedin.com/in/diegothucao","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/diegothucao.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,"zenodo":null}},"created_at":"2019-04-13T02:32:44.000Z","updated_at":"2022-10-16T05:49:44.000Z","dependencies_parsed_at":"2023-06-16T20:32:41.236Z","dependency_job_id":null,"html_url":"https://github.com/diegothucao/react-native-javascript-redux-saga-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/diegothucao/react-native-javascript-redux-saga-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegothucao%2Freact-native-javascript-redux-saga-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegothucao%2Freact-native-javascript-redux-saga-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegothucao%2Freact-native-javascript-redux-saga-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegothucao%2Freact-native-javascript-redux-saga-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegothucao","download_url":"https://codeload.github.com/diegothucao/react-native-javascript-redux-saga-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegothucao%2Freact-native-javascript-redux-saga-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263677006,"owners_count":23494615,"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":["basic","best-first-search","best-practices","boilerplate","boilerplate-template","es6","essential","examples","javascript","react-js","react-native","redux","redux-react","redux-saga","template-project"],"created_at":"2024-11-25T02:07:05.309Z","updated_at":"2025-10-13T01:46:03.799Z","avatar_url":"https://github.com/diegothucao.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native with Javascript and Redux-saga\nThis is an essential example to build React-native app using Javascript and Redux Saga.\n\nStep to run\n1. Clone the [repo](https://github.com/diegothucao/react-native-javascript-redux-saga-template)\n2. `yarn install` OR `npm install`\n3. `react-native eject`\n4. `react-native run-ios` OR `react-native run-android`\n\nDefine Actions \n\n```javascript \n\nimport { FETCHING_DEALS_LIST, FETCHING_DEALS_SEARCH, VIEW_DEAL_DETAIL, BACK_TO_DEAL_LIST, FETCHING_DEAL_DETAIL } from \"../util/constants\";\n\nexport const fetchData = () =\u003e {\n    return { type: FETCHING_DEALS_LIST } \n}\n\nexport const searchDeals = (searchStr) =\u003e {\n    return { type: FETCHING_DEALS_SEARCH, payload: searchStr } \n}\n\nexport const fetchDetail = (dealId) =\u003e {\n    return { type: FETCHING_DEAL_DETAIL, payload: dealId }\n}\n\nexport const backToDealList = () =\u003e {\n    return { type: BACK_TO_DEAL_LIST } \n}\n```\n\nDefine Reducer \n\n```javascript\nimport {\n        FETCHING_DEALS_LIST, FETCHING_DEALS_SUCCESS, FETCHING_DEALS_FAIL\n        , FETCHING_DEALS_SEARCH, BACK_TO_DEAL_LIST,\n        FETCHING_DEAL_DETAIL, FETCHING_DEAL_DETAIL_SUCCESS, FETCHING_DEAL_DETAIL_FAIL\n} from '../util/constants'\n\nconst initialState = {\n        data: [],\n        currentDealId: null,\n        currentDeal: null,\n        dataFetched: false,\n        isFetching: false,\n        error: false\n}\n\nexport default dataReducer = (state = initialState, action) =\u003e {\n        switch (action.type) {\n                case FETCHING_DEALS_LIST:\n                        return {\n                                ...state,\n                                data: [],\n                                isFetching: true\n                        }\n                case FETCHING_DEALS_SEARCH:\n                        return {\n                                ...state,\n                                data: [],\n                                isFetching: true\n                        }\n                case FETCHING_DEALS_SUCCESS:\n                        return {\n                                ...state,\n                                isFetching: false,\n                                data: action.data\n                        }\n                case FETCHING_DEALS_FAIL:\n                        return {\n                                ...state,\n                                isFetching: false,\n                                error: true\n                        }\n                case FETCHING_DEAL_DETAIL:\n                        return {\n                                ...state,\n                                isFetching: true,\n                                currentDeal: null\n                        }\n                case FETCHING_DEAL_DETAIL_SUCCESS:\n                        return {\n                                ...state,\n                                isFetching: false,\n                                currentDeal: action.data\n                        }\n                case FETCHING_DEAL_DETAIL_FAIL:\n                        return {\n                                ...state,\n                                isFetching: false,\n                                error: true\n                        }\n                case BACK_TO_DEAL_LIST:\n                        return {\n                                ...state,\n                                isFetching: false,\n                                currentDeal: null\n                        }\n                default:\n                        return state\n        }\n}\n```\n\nIf you see any issue, please do not hesitate to create an issue here or can contact me via email cao.trung.thu@gmail.com or [Linkedin](https://www.linkedin.com/in/diegothucao/)\n\nThanks\n\t\nreferences\n 1. https://facebook.github.io/react-native/docs/tutorial\t\n 2. https://github.com/jscomplete/react-native-essential-training\n 3. https://redux-saga.js.org\n 4. https://www.tutorialspoint.com/es6\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegothucao%2Freact-native-javascript-redux-saga-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegothucao%2Freact-native-javascript-redux-saga-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegothucao%2Freact-native-javascript-redux-saga-template/lists"}