{"id":18799572,"url":"https://github.com/l2silver/redux-noredux","last_synced_at":"2026-01-02T20:30:14.725Z","repository":{"id":57351071,"uuid":"113530947","full_name":"l2silver/redux-noredux","owner":"l2silver","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-11T23:23:00.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T07:36:27.065Z","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/l2silver.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-12-08T04:17:37.000Z","updated_at":"2017-12-08T04:17:47.000Z","dependencies_parsed_at":"2022-09-18T00:20:23.221Z","dependency_job_id":null,"html_url":"https://github.com/l2silver/redux-noredux","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/l2silver%2Fredux-noredux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-noredux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-noredux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-noredux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l2silver","download_url":"https://codeload.github.com/l2silver/redux-noredux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239397443,"owners_count":19631641,"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-11-07T22:15:46.942Z","updated_at":"2026-01-02T20:30:14.677Z","avatar_url":"https://github.com/l2silver.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# noredux (Not Only Redux)\n\nnoredux is a non-event-driven version of redux. \n\n# Install\n\n```\nyarn add redux redux-noredux noredux\n```\n\n# Usage\n\n```\nimport {createStore} from 'redux'\nimport {enableNoredux, noreduxAction} from 'redux-noredux'\n\nconst reducer2InitialState = 1\n\nconst reducer = (state, action)=\u003estate\n\nconst store = createStore(enableNoredux(reducers), {reducer2: reducer2InitialState})\n\nconst reducer2 = (state)=\u003e({...state, reducer2: state.reducer2 + 1})\n\nstore.dispatch(noreduxAction(reducer))\n\nconsole.log(store.getState())\n\n/*\n  {\n    reducer2: 2\n  }\n*/\n```\n\n# Usage with combineReducers\n\n```\nimport {createStore, combineReducers} from 'redux'\nimport {fakeReducer, enableNoredux, noreduxAction} from 'redux-noredux'\n\nconst reducer2InitialState = 1\n\nconst reducers = combineReducers({\n  reducer1: (state=null, action)=\u003estate\n  reducer2: fakeReducer(reducer2InitialState)\n})\n\nconst store = createStore(enableNoredux(reducers))\n\nconst reducer2 = (state)=\u003e({...state, reducer2: state.reducer2 + 1})\n\nstore.dispatch(noreduxAction(reducer))\n\nconsole.log(store.getState())\n/*\n  {\n    reducer1: null,\n    reducer2: 2\n  }\n*/\n```\n\n# defining action type, and args\n\nThe noreduxAction function takes the reducer function as it's only argument. It looks to the reducer function for the properties type and args.\n\n```\nimport {noreduxAction} from 'redux-noredux'\n\nconst reducerCreator = (...args)=\u003e{\n  const reducer = (state)=\u003enextState\n  reducer.type = 'example type'\n  reducer.args = args\n  return reducer\n}\n\nconst reducer = reducerCreator(1, 2)\nconsole.log(noreduxAction(reducer))\n\n/*\n  {\n    type: '@@redux-noredux/example type',\n    args: [1, 2],\n    reducer,\n    noredux: true\n  }\n*/\n```\n\n# Example App\n\nCheckout the examples section for a working example of a react-noredux app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Fredux-noredux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl2silver%2Fredux-noredux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Fredux-noredux/lists"}