{"id":28398395,"url":"https://github.com/primus/ironhide","last_synced_at":"2025-06-28T14:31:39.149Z","repository":{"id":57276886,"uuid":"87761031","full_name":"primus/ironhide","owner":"primus","description":"An opinionated way on how you could use Primus with React. ","archived":false,"fork":false,"pushed_at":"2017-04-10T03:54:27.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T13:16:01.630Z","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/primus.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":"2017-04-10T03:08:42.000Z","updated_at":"2017-11-15T20:51:01.000Z","dependencies_parsed_at":"2022-09-15T19:12:59.841Z","dependency_job_id":null,"html_url":"https://github.com/primus/ironhide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/primus/ironhide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primus%2Fironhide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primus%2Fironhide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primus%2Fironhide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primus%2Fironhide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primus","download_url":"https://codeload.github.com/primus/ironhide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primus%2Fironhide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262444795,"owners_count":23312229,"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":"2025-06-01T04:38:38.545Z","updated_at":"2025-06-28T14:31:39.144Z","avatar_url":"https://github.com/primus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ironhide\n\nIronhide is a small React wrapper for Primus. It is one of the many ways on how\nyou can use React with Primus. The benefit of using Ironhide is that it shares\na single connection with all child components by leveraging the React Context\nAPI.\n\n## Installation\n\nThe module is released in the public npm registry and can be installed by\nrunning on your CLI:\n\n```\nnpm install --save ironhide\n```\n\n## Usage\n\nThe component assumes that the `Primus` variable is already available on your\npage as global. So just make sure you include the Primus library on your page\n**before** you mount the application that uses Ironhide.\n\nOnce the application is mounted we will establish a connection with the supplied\nPrimus server URL and once we component is unmounted we close the connection\nautomatically again.\n\nThe Ironhide component accepts the following arguments:\n\n- **url** The URL of the Primus server we should connect to.\n- **config** Optional Primus configuration, see [Primus] for all available\n  options.\n\nIn the following example we create a small React component that wraps your base\napplication with Ironhide to provide it with a single Real-time connection.\n\n```js\nimport React, { Component } from 'react';\nimport { render } from 'react-dom';\nimport Ironhide from 'ironhide';\nimport App from './renderer';\n\n/**\n * Default application wrapper.\n *\n * @constructor\n */\nexport default class Realtime extends Component {\n  render() {\n    \u003cIronhide url='http://localhost:8080'\u003e\n      \u003cApp /\u003e\n    \u003c/Ironhide\u003e\n  }\n}\n\n//\n// Mount the application to a root element that is specified on our imaginary\n// page.\n//\nrender(\u003cRealtime /\u003e, document.getElementById('root'));\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimus%2Fironhide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimus%2Fironhide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimus%2Fironhide/lists"}