{"id":44558780,"url":"https://github.com/webkrafters/react-observable-context","last_synced_at":"2026-03-03T06:13:53.711Z","repository":{"id":63620770,"uuid":"568416802","full_name":"webKrafters/react-observable-context","owner":"webKrafters","description":"Observable react context [Eagle Eye] - prevents an automatic total component tree re-rendering at context change.","archived":false,"fork":false,"pushed_at":"2026-02-13T20:09:46.000Z","size":3403,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-14T03:30:35.477Z","etag":null,"topics":["connect","context","hoc","hooks","react","react-context","react-hooks","state-management","usecontext"],"latest_commit_sha":null,"homepage":"https://eagleeye.js.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webKrafters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://www.paypal.me/webKrafters"]}},"created_at":"2022-11-20T13:24:03.000Z","updated_at":"2026-02-13T19:30:13.000Z","dependencies_parsed_at":"2024-03-07T23:22:15.812Z","dependency_job_id":"31d6cf41-6ece-4581-b68c-eec055c08f97","html_url":"https://github.com/webKrafters/react-observable-context","commit_stats":{"total_commits":235,"total_committers":3,"mean_commits":78.33333333333333,"dds":"0.48085106382978726","last_synced_commit":"f04117840a7c9822e3f97f95288d4f8ac18bf2bc"},"previous_names":["webkrafters/eagleeye","webkrafters/react-observable-context"],"tags_count":116,"template":false,"template_full_name":null,"purl":"pkg:github/webKrafters/react-observable-context","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webKrafters%2Freact-observable-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webKrafters%2Freact-observable-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webKrafters%2Freact-observable-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webKrafters%2Freact-observable-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webKrafters","download_url":"https://codeload.github.com/webKrafters/react-observable-context/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webKrafters%2Freact-observable-context/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29667116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["connect","context","hoc","hooks","react","react-context","react-hooks","state-management","usecontext"],"created_at":"2026-02-13T22:20:20.638Z","updated_at":"2026-03-03T06:13:53.706Z","avatar_url":"https://github.com/webKrafters.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg alt=\"Eagle Eye\" height=\"150px\" src=\"logo.png\" width=\"250px\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://typescriptlang.org\"\u003e\n\t\t\u003cimg alt=\"TypeScript\" src=\"https://badgen.net/badge/icon/typescript?icon=typescript\u0026label\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/webKrafters/react-observable-context/actions\"\u003e\n\t\t\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/webKrafters/react-observable-context/test.yml\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://coveralls.io/github/webKrafters/react-observable-context\"\u003e\n\t\t\u003cimg alt=\"coverage\" src=\"https://img.shields.io/coverallsCoverage/github/webKrafters/react-observable-context.svg\"\u003e\n\t\u003c/a\u003e\n\t\u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/l/@webkrafters/react-observable-context\"\u003e\n\t\u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/maintenance/yes/2032\"\u003e\n\t\u003cimg alt=\"build size\" src=\"https://img.shields.io/bundlephobia/minzip/@webkrafters/react-observable-context?label=bundle%20size\"\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/@webKrafters/react-observable-context\"\u003e\n\t\t\u003cimg alt=\"Downloads\" src=\"https://img.shields.io/npm/dt/@webkrafters/react-observable-context.svg\"\u003e\n\t\u003c/a\u003e\n\t\u003cimg alt=\"GitHub package.json version\" src=\"https://img.shields.io/github/package-json/v/webKrafters/react-observable-context\"\u003e\n\u003c/p\u003e\n\n# React-Observable-Context [Eagle Eye]\n\n\u003ctable BORDER-COLOR=\"0a0\" BORDER-WIDTH=\"2\"\u003e\n    \u003ctd VALIGN=\"middle\" ALIGN=\"center\" FONT-WEIGHT=\"BOLD\" COLOR=\"#333\" HEIGHT=\"250px\" width=\"1250px\"\u003e\n\t\tCOMPATIBLE WITH REACT VERSIONS 16.8 to 18.x.x.\u003cbr /\u003e\n\t\tA NEW EAGLEEYE BASED PRODUCT WILL BE DEVELOPED SPECIFICALLY FOR REACT 19+\u003cbr /\u003e\u003cbr /\u003e\n\t\tPLEASE STAY TUNED.\n\t\u003c/td\u003e\n\u003c/table\u003e\n\n\u003cul\u003e\n\t\u003cli\u003e Ready for use anywhere in the app. No Provider components needed.\u003c/li\u003e\n\t\u003cli\u003e Auto-immutable update-friendly context. See \u003ca href=\"https://eagleeye.js.org/concepts/store/setstate\"\u003e\u003ccode\u003estore.setState\u003c/code\u003e (under revision)\u003c/a\u003e.\u003c/li\u003e\n\t\u003cli\u003e A context bearing an observable consumer \u003ca href=\"https://eagleeye.js.org/concepts/store\"\u003estore (under revision)\u003c/a\u003e.\u003c/li\u003e\n\t\u003cli\u003e Recognizes \u003cb\u003enegative array indexing\u003c/b\u003e. Please see \u003ca href=\"https://eagleeye.js.org/concepts/property-path\"\u003eProperty Path (under revision)\u003c/a\u003e and \u003ccode\u003estore.setState\u003c/code\u003e \u003ca href=\"https://eagleeye.js.org/concepts/store/setstate#indexing\"\u003eIndexing (under revision)\u003c/a\u003e.\u003c/li\u003e\n\t\u003cli\u003e Only re-renders subscribing components (\u003ca href=\"https://eagleeye.js.org/concepts/client\"\u003eclients (under revision)\u003c/a\u003e) on context state changes.\u003c/li\u003e\n\t\u003cli\u003e Subscribing component decides which context state properties' changes to trigger its update.\u003c/li\u003e\n\u003c/ul\u003e\n\n**Name:** React-Observable-Context\n\n**Moniker:** Legacy Eagle Eye\n\n**Usage:** Please see \u003cb\u003e\u003ca href=\"https://eagleeye.js.org/getting-started\"\u003eGetting Started (under revision)\u003c/a\u003e\u003c/b\u003e.\n\n**Demo:** [Play with the app on codesandbox (under revision)](https://codesandbox.io/s/github/webKrafters/react-observable-context-app)\\\nIf sandbox fails to load app, please refresh dependencies on its lower left.\n\n**Install:**\\\nnpm install --save @webkrafters/react-observable-context\\\n\n## Usage:\n\n```tsx\nimport { FC } from 'react';\nimport { createEagleEye } from '@webkrafters/react-observable-context';\n\nconst context = createEagleEye(\n\tT|AutoImmutable\u003cT\u003e?,\n\tPrehooks\u003cT\u003e?,\n\tIStorage\u003cT\u003e?\n);\n\n// component consuming change stream manually\nconst useStream = context.useStream;\nconst Component1 : FC = () =\u003e {\n\tconst {\n\t\tdata,\n\t\tresetState,\n\t\tsetState\n\t} = useStream( SelectorMap );\n\t...\n};\n\n// components consuming change stream through a reusable adapter\nconst connect = context.connect( SelectorMap? );\nconst Component2 = connect(({ data, resetState, setState, ...ownProps }) =\u003e {...});\nconst Component3 = connect(({ data, resetState, setState, ...ownProps }) =\u003e {...});\n\nconst App : FC = () =\u003e (\n\t\u003c\u003e\n\t\t\u003cComponent1 /\u003e\n\t\t\u003cComponent2 /\u003e\n\t\t\u003cComponent3 /\u003e\n\t\u003c/\u003e\n);\n\n```\n\n### Releasing context resources.\n```tsx\ncontext.dispose();\n```\nDeactivates this context by:\n\u003col\u003e\n\t\u003cli\u003eunsubscribing all observers to it\u003c/li\u003e\n\t\u003cli\u003esevering connections to data stores\u003c/li\u003e\n\t\u003cli\u003eunsetting all resources\u003c/li\u003e\n\u003c/ol\u003e\n\n### Accessing external store reference.\n```tsx\nconst store = context.store;\n// https://eagleeye.js.org/concepts/store/resetstate/\nstore.resetState( Array\u003cstring\u003e? );\n// https://eagleeye.js.org/concepts/store/setstate/\nstore.setState( Changes\u003cT\u003e );\n// https://eagleeye.js.org/concepts/store/getstate/\nconst state = store.getState( Array\u003cstring\u003e );\n// https://eagleeye.js.org/concepts/store/subscribe/\nconst unsubscribeFn = store.subscribe( eventType, listener );\n```\nAny actions taken here is applied to all components streaming affected state slices.\\\nCaveat 1: Parameterless \u003ccode\u003econtext.store.getState\u003c/code\u003e returns the whole state.\\\nCaveat 2: Parameterless \u003ccode\u003econtext.store.resetState\u003c/code\u003e which is a no-op.\n\n### Joining the context stream.\nA context stream allows a client to set up a dedicated channel through which it receives automatic updates whenever its selected slices of state change. It can also update the context through this channel.\n```tsx\nconst useStream = context.stream;\n// joining the stream twice\n// for more on selectorMap - https://eagleeye.js.org/concepts/selector-map/\nconst store1 = useStream(SelectorMap?);\nconst store2 = useStream(SelectorMap?);\n// access the current data value monitored by this store\nconsole.log( 'data', store1.data );\n// https://eagleeye.js.org/concepts/store/resetstate/\nstore1.resetState( Array\u003cstring\u003e? ); // changes are context-wide\n// https://eagleeye.js.org/concepts/store/setstate/\nstore1.setState( Changes\u003cT\u003e ); // changes are context-wide\n```\nAny actions taken here is applied to all components streaming affected state slices.\\\nCaveat 1: Parameterless \u003ccode\u003estore.resetState\u003c/code\u003e resets state slices consumed by this store.\\\nCaveat 2: Parameterless \u003ccode\u003estore.resetState\u003c/code\u003e for stores not consuming state is a no-op.\n\n### Accessing underlying cache.\n```tsx\nconst cache = context.cache;\n```\n\n### Accessing `close` status.\n```tsx\nconst closed = context.closed;\n```\n\n### Accessing current state update `prehooks`.\n```tsx\nconst prehooks = context.prehooks;\n```\n\n### Updating state update `prehooks`.\n```tsx\ncontext.prehooks = Prehooks\u003cT\u003e?;\n```\n\n### Accessing context `storage`.\n```tsx\nconst storage = context.storage;\n```\n\n### Updating context `storage`.\n```tsx\ncontext.storage = IStorage\u003cT\u003e?;\n```\n\nMay also see \u003cb\u003e\u003ca href=\"https://eagleeye.js.org/history/features\"\u003eWhat's Changed? (currently uunder revision)\u003c/a\u003e\u003c/b\u003e\n\n## Please see full documentation here:\n**[eagleeye.js.org](https://eagleeye.js.org)** (currently out-of-date pending revision)\n\n# License\n\nGPLv3\n","funding_links":["https://www.paypal.me/webKrafters"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebkrafters%2Freact-observable-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebkrafters%2Freact-observable-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebkrafters%2Freact-observable-context/lists"}