{"id":18872529,"url":"https://github.com/lilactown/react-repl","last_synced_at":"2025-08-23T01:35:14.081Z","repository":{"id":62434970,"uuid":"400319562","full_name":"lilactown/react-repl","owner":"lilactown","description":"A library for interacting with a live React application at a REPL.","archived":false,"fork":false,"pushed_at":"2021-08-28T00:12:20.000Z","size":12,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-16T06:58:22.650Z","etag":null,"topics":["clojurescript","developer-tools","react"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lilactown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-26T22:16:42.000Z","updated_at":"2023-03-10T14:16:19.000Z","dependencies_parsed_at":"2022-11-01T20:46:02.150Z","dependency_job_id":null,"html_url":"https://github.com/lilactown/react-repl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lilactown/react-repl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilactown%2Freact-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilactown%2Freact-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilactown%2Freact-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilactown%2Freact-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lilactown","download_url":"https://codeload.github.com/lilactown/react-repl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilactown%2Freact-repl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271730255,"owners_count":24811068,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clojurescript","developer-tools","react"],"created_at":"2024-11-08T05:30:25.926Z","updated_at":"2025-08-23T01:35:14.053Z","avatar_url":"https://github.com/lilactown.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-repl\n\n[![Clojars Project](https://img.shields.io/clojars/v/town.lilac/react-repl.svg)](https://clojars.org/town.lilac/react-repl)\n\n\nA library for interacting with a live React application at a REPL.\n\n## Intro\n\nA \\\"fiber\\\" in React-lingo is a data representation of the current state of an\nelement in your application. Each element has a corresponding `type` - a\nfunction, a class, or a built in type - that dictates how to respond to new\nprops or state dispatches. A fibers data also contains the props and state\nlast used to render it, any children or sibling fibers, as well as references\nto platform objects like DOM nodes.\n\nA \\\"root\\\" in React-lingo is the root fiber of an application in your JS\nenvironment. These are created anytime you call e.g. `react-dom/render` or, in\nReact 18+, `react-dom/createRoot`. You can have multiple roots at a time, for\ninstance if you call `react-dom/render` multiple times to render different\nparts of the page as different applications. Each root gets an associated ID,\nan integer that starts at 1.\n\n## Using\n\nTo use this library, include `react-repl.preloads` in your developer preloads.\nEach time your application is re-rendered, a new tree of fibers is constructed\nto represent the new state of the application. When that new fiber tree is\n_committed_ - i.e changes are made to what's shown on the screen - the new\ntree will be captured and placed in the `react-repl.state/roots` atom.\n\nThe functions in this namespace operate on this atom to get the root fiber and\nsearch, display and interact with the fibers that were captured as of the last\nrender.\n\n`react-repl.core/find-all` will give you the fibers of the last time a\nspecific component type was rendered. `react-repl.core/find` will return the\nfirst fiber it finds for a component type. You can then use functions like\n`react-repl.core/props`, `react-repl.core/children`, and\n`react-repl.core/state` to inspect its properties as Clojure data.\n\n`react-repl.core/fiber-\u003emap` will return a map corresponding to commonly\nlooked up information about the fiber.\n\nNote that `state` can sometimes be a deeply nested datastructure. I find that\nusing `js/console.log` in a browser environment works better for me than\nrelying on printing at a REPL, but YMMV.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilactown%2Freact-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flilactown%2Freact-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilactown%2Freact-repl/lists"}