{"id":15655899,"url":"https://github.com/timdorr/react-log-state","last_synced_at":"2025-05-05T03:42:17.267Z","repository":{"id":57334107,"uuid":"65514748","full_name":"timdorr/react-log-state","owner":"timdorr","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-01T10:57:57.000Z","size":5,"stargazers_count":24,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T03:41:58.636Z","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/timdorr.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":"2016-08-12T01:55:46.000Z","updated_at":"2023-12-28T17:33:46.000Z","dependencies_parsed_at":"2022-08-31T03:30:33.866Z","dependency_job_id":null,"html_url":"https://github.com/timdorr/react-log-state","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdorr%2Freact-log-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdorr%2Freact-log-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdorr%2Freact-log-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdorr%2Freact-log-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timdorr","download_url":"https://codeload.github.com/timdorr/react-log-state/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252436240,"owners_count":21747467,"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-10-03T13:00:45.551Z","updated_at":"2025-05-05T03:42:17.241Z","avatar_url":"https://github.com/timdorr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Log State [![npm package][npm-badge]][npm]\n\n[npm-badge]: https://img.shields.io/npm/v/react-log-state.svg?style=flat-square\n[npm]: https://www.npmjs.org/package/react-log-state\n\nA little tweak on [@ryanflorence](https://github.com/ryanflorence)'s [React Lumberjack](https://github.com/ryanflorence/react-lumberjack). Lets you track setState calls on React elements at runtime.\n\n![](http://i.imgur.com/8BmfFyt.png)\n\n## Setup\n\n#### [npm](https://www.npmjs.com)\nInstall package:\n```\nnpm install react-log-state\n```\nAnd include in your code:\n```js\nrequire('react-log-state')\n```\n\n#### `\u003cscript\u003e` tag\nAdd the following to your HTML anywhere:\n```html\n\u003cscript src=\"https://npmcdn.com/react-log-state\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nOpen up your browser's console. Select an element using the [React DevTools](https://github.com/facebook/react-devtools) (which makes it available on the `$r` variable). Then activate logging:\n```js\nReactLogState($r)\n```\nThat's it! Any calls to `setState` will be logged in the console.\n\n---\n\nYou can also hook into all `setState` calls globally:\n```js\nReactLogState.logAll()\n```\nOf course, this technically alters how `setState` operates, so you may have a bad time if any of your components making a lot of changes to state.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdorr%2Freact-log-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimdorr%2Freact-log-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdorr%2Freact-log-state/lists"}