{"id":17651801,"url":"https://github.com/lahsivjar/react-stomp","last_synced_at":"2025-04-05T08:08:53.069Z","repository":{"id":27402108,"uuid":"113729362","full_name":"lahsivjar/react-stomp","owner":"lahsivjar","description":"React websocket component for STOMP protocol over SockJs","archived":false,"fork":false,"pushed_at":"2023-01-05T16:20:12.000Z","size":1232,"stargazers_count":136,"open_issues_count":49,"forks_count":42,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T07:07:42.967Z","etag":null,"topics":["reactjs","sockjs-client","stompclient","websocket-client"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-stomp","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/lahsivjar.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":"2017-12-10T06:42:01.000Z","updated_at":"2025-02-01T05:17:58.000Z","dependencies_parsed_at":"2023-01-14T06:40:04.717Z","dependency_job_id":null,"html_url":"https://github.com/lahsivjar/react-stomp","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Freact-stomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Freact-stomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Freact-stomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahsivjar%2Freact-stomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lahsivjar","download_url":"https://codeload.github.com/lahsivjar/react-stomp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"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":["reactjs","sockjs-client","stompclient","websocket-client"],"created_at":"2024-10-23T11:43:43.403Z","updated_at":"2025-04-05T08:08:53.056Z","avatar_url":"https://github.com/lahsivjar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-stomp\n\n[![Build Status](https://travis-ci.com/lahsivjar/react-stomp.svg?branch=master)](https://travis-ci.com/lahsivjar/react-stomp?branch=master) [![Coverage Status](https://coveralls.io/repos/github/lahsivjar/react-stomp/badge.svg?branch=master)](https://coveralls.io/github/lahsivjar/react-stomp?branch=master) [![License](https://img.shields.io/npm/l/react-stomp.svg)](https://github.com/lahsivjar/react-stomp/blob/master/LICENSE)  [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)\n\nReact component for [SockJS-client](https://github.com/sockjs/sockjs-client) with [STOMP](https://stomp.github.io/) messaging protocol.\n\n## Installation\n\n```sh\nnpm install --save react-stomp\n```\n\n## Example Usage\n\n```jsx\nimport React from 'react';\nimport SockJsClient from 'react-stomp';\n\nclass SampleComponent extends React.Component {\n  constructor(props) {\n    super(props);\n  }\n\n  sendMessage = (msg) =\u003e {\n    this.clientRef.sendMessage('/topics/all', msg);\n  }\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cSockJsClient url='http://localhost:8080/ws' topics={['/topics/all']}\n            onMessage={(msg) =\u003e { console.log(msg); }}\n            ref={ (client) =\u003e { this.clientRef = client }} /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n## Demonstration\n\n\u003chttps://react-websocket.herokuapp.com/index\u003e\n\nA working implementation using [Spring Boot](https://projects.spring.io/spring-boot/) and [react-talk](https://github.com/lahsivjar/react-talk) can be found at \u003chttps://github.com/lahsivjar/spring-websocket-template/tree/master/with-sockjs\u003e\n\n## API Docs\n\nAuto generated docs available [here](API.md).\n\n## Issues\n\nReport any issues or bugs to \u003chttps://github.com/lahsivjar/react-stomp/issues\u003e\n\n## Changelog\n\n### 5.1.0\n- Fix subscribeHeaders corruption when subscribing to multiple topics\n- Minor upgrades:\n    - sinon\n    - nyc\n    - acorn\n    - websocket-extensions\n    - handlebars\n    - lodash\n    - sockjs-client\n    - highlightjs\n    - ini\n\n### 5.0.0\n- Update react from 16.6.3 to 16.13.0\n- Fix deprecation of `componentWillReceiveProps`\n\n### 4.3.0\n- Update handlebar dependency\n\n### 4.2.0\n\n- Add `onConnectFailure` callback\n- Upgrade babel to babel7\n\n### 4.1.1\n\n- [BugFix #96] Remove array slice of subscribe headers\n\n### 4.1.0\n\n- Update react from 16.5.0 to 16.6.3\n- Update react-dom from 16.5.0 to 16.6.3\n- [PR #93] Use STOMP message frame to find correct topic\n\n### 4.0.0\n\n-   Improve test coverage\n-   [BugFix #61] Add support for receiving plain text messages\n-   [BugFix #70] Fix reconnect loop under certain circumstances even after disconnect is called\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahsivjar%2Freact-stomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flahsivjar%2Freact-stomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahsivjar%2Freact-stomp/lists"}