{"id":20078694,"url":"https://github.com/wpdas/react-hoc-console","last_synced_at":"2025-07-24T07:04:09.036Z","repository":{"id":77498439,"uuid":"167111037","full_name":"wpdas/react-hoc-console","owner":"wpdas","description":"A way to see logs into React app through a simple and helpful UI.","archived":false,"fork":false,"pushed_at":"2019-01-26T07:56:29.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T02:57:06.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/wpdas.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-23T03:31:59.000Z","updated_at":"2019-01-26T07:54:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"1772b6c3-52dd-4efe-bce0-cf4e0f35d7db","html_url":"https://github.com/wpdas/react-hoc-console","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"8ae4ab3cc0b3d7fddfece731cf5e06912575f9f8"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Freact-hoc-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Freact-hoc-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Freact-hoc-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Freact-hoc-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpdas","download_url":"https://codeload.github.com/wpdas/react-hoc-console/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241509658,"owners_count":19974071,"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-13T15:16:16.202Z","updated_at":"2025-03-02T13:14:46.536Z","avatar_url":"https://github.com/wpdas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React HOC Console\n\nThis is a simple HOC that allows you to see what is happening with the native console API, however, into your app. It's personalizable, I mean, you can activate or deactivate this HOC.\n\n### How to use\n\nThe `reactConsole` method provides two parameters, the first one is waiting for a React component. The second one is a boolean that activates or deactivate the console UI. You still be able to see the native console working through the dev tools.\n\n```javascript\n/**\n * @param {React.Component} component - React component\n * @param {Boolean} activate - Should console UI is activated\n * @param {Boolean} autoScroll - Console UI scrolls down automatically when it receives new logs\n */\nreactConsole(component:React.Component, activate:boolean = true, autoScroll:boolean = true);\n```\n\n### HOC working:\n\nBelow is a code generated by `npx create-react-app` and modified to show the effect of the console.\n[Read more](https://reactjs.org/docs/create-a-new-react-app.html#create-react-app).\n\n```jsx\nimport React, { Component } from 'react';\nimport reactConsole from 'react-hoc-console';\nimport logo from './logo.svg';\nimport './App.css';\n\nclass App extends Component {\n  componentDidMount() {\n    console.log('Component Did Mount!');\n    console.info('Component Did Mount!');\n    console.warn('Component Did Mount!');\n    console.debug('Component Did Mount!');\n    console.error('Component Did Mount!', 'App.js - 12');\n  }\n  render() {\n    return (\n      \u003cdiv className=\"App\"\u003e\n        \u003cheader className=\"App-header\"\u003e\n          \u003cimg src={logo} className=\"App-logo\" alt=\"logo\" /\u003e\n          \u003cp\u003e\n            Edit \u003ccode\u003esrc/App.js\u003c/code\u003e and save to reload.\n          \u003c/p\u003e\n          \u003ca\n            className=\"App-link\"\n            href=\"https://reactjs.org\"\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n          \u003e\n            Learn React\n          \u003c/a\u003e\n        \u003c/header\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nexport default reactConsole(App);\n```\n\n\u003cimg width=\"358\" alt=\"screenshot 2019-01-26 at 05 51 30\" src=\"https://user-images.githubusercontent.com/3761994/51784367-c511c880-212e-11e9-911c-e908606da8ca.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdas%2Freact-hoc-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpdas%2Freact-hoc-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdas%2Freact-hoc-console/lists"}