{"id":21669321,"url":"https://github.com/attack-monkey/react-fn","last_synced_at":"2026-05-02T20:39:18.770Z","repository":{"id":91874064,"uuid":"170774993","full_name":"attack-monkey/react-fn","owner":"attack-monkey","description":"A simple, functional approach to React","archived":false,"fork":false,"pushed_at":"2019-03-14T18:33:37.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-22T07:18:37.799Z","etag":null,"topics":["functional","functional-programming","react"],"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/attack-monkey.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":"2019-02-14T23:58:46.000Z","updated_at":"2019-03-14T18:33:39.000Z","dependencies_parsed_at":"2023-04-02T12:16:52.770Z","dependency_job_id":null,"html_url":"https://github.com/attack-monkey/react-fn","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.42307692307692313","last_synced_commit":"adc5b636c00063b6f6694fe270e5017984406e01"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/attack-monkey/react-fn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Freact-fn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Freact-fn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Freact-fn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Freact-fn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/attack-monkey","download_url":"https://codeload.github.com/attack-monkey/react-fn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Freact-fn/sbom","scorecard":{"id":215647,"data":{"date":"2025-08-11","repo":{"name":"github.com/attack-monkey/react-fn","commit":"adc5b636c00063b6f6694fe270e5017984406e01"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T01:36:29.303Z","repository_id":91874064,"created_at":"2025-08-17T01:36:29.304Z","updated_at":"2025-08-17T01:36:29.304Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["functional","functional-programming","react"],"created_at":"2024-11-25T12:20:46.014Z","updated_at":"2026-05-02T20:39:13.759Z","avatar_url":"https://github.com/attack-monkey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React-Fn v.2\nA simple, functional approach to React\n\n## Install\n\nGlobally install parcel.js (This is the project bundler).\n\n```\n\nnpm install -g parcel-bundler\n\n```\n\nGlobally install douglas (This unwraps the seed project )\n\n```\n\nnpm install -g douglas\n\n```\n\nGet react-fn-seed and install using douglas\n\n```\n\ndouglas get react-fn-seed\n\n```\n\nNow you can run using `npm start`\n\n## The Low-down\n\nReact-fn is a functional approach to React. Take a look at this basic app below. You'll notice that State and Actions are decoupled from Components altogether, making things clean and simple.\n\n- Components take in State and Actions\n- Components can display State, but Components must call Actions to update State\n- Upon state-change, the app refreshes\n\n## Basic App\n\n```jsx\n\n// global state\nconst state = {\n  greeting: 'hello world'\n};\n\n// functional component has state and actions passed in\nconst MyComponent = ({ state, actions }) =\u003e (\n  \u003cdiv\u003e\n    \u003ch1\u003e{state.greeting}\u003c/h1\u003e\n    \u003cbutton onClick={ actions.changeGreeting('hello ben') }\u003eChange greeting\u003c/button\u003e\n    {/* Pass state and actions into any child components */}\n    \u003cchildComponent state={state} actions={actions}\u003e\u003c/childComponent\u003e\n  \u003c/div\u003e\n);\n\n// actions have the fn api passed in and fn.updateState can be used to update the App's State\nconst actions = (fn) =\u003e {\n  changeGreeting: (fn) =\u003e (newGreeting) =\u003e fn.updateState('greeting', newGreeting)\n}\n\n// This is where your app will be mounted\nconst mount = document.querySelector('#app');\n\n// run your app\napp(state, MyComponent, actions, mount);\n\n```\n\n## Actions\n\nActions are functions that cause side-effects (Usually state changes).  \nAs you can see above, Actions are passed in to the first component.  \nActions are then passed down to child components.  \nActions can also be passed into actions to enable action-chaining.\n\n## State\n\nRather than State existing within components, it is stored in a single State object.\nState is just a pure javascript object (no methods).  \nState is passed into the first component and can be passed down to child components.\n\nChanging state is done by Actions via the `fn.updateState` method...\n\nLet's say your state is \n\n```\n\nsome: {\n  nested: {\n    node: 'hello'\n  }\n}\n\n```\n\nand you want to make a change to `some.nested.node`, then...\n\n```javascript\n\nfn.updateState('some/nested/node', 'here i am');\n\n```\n\nState is now changed to \n\n```\n\nsome: {\n  nested: {\n    node: 'here i am'\n  }\n}\n\n```\n\nWhenever `fn.updateState` is called, the app is rerendered, unless the flag `rerender: false` is passed in ...\n\n```javascript\n\n// The following will not rerender the app\nfn.updateState('some/nested/node', 'here i am', { rerender: false });\n\n```\n\n## The Advanced Guide\n\nhttps://github.com/attack-monkey/react-fn/tree/develop/docs/TOC.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattack-monkey%2Freact-fn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattack-monkey%2Freact-fn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattack-monkey%2Freact-fn/lists"}