Skip to content

Commit c397050

Browse files
committed
docs(READM.md): improve grammer
1 parent 4207a85 commit c397050

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# React MQTT Workflow Manager
33

4-
React MQTT Workflow Manager is a React component library designed to wrap all [MQTT](https://mqtt.org/) sub logic behind the scenes. It deals only with events, no commands. The manager comunicates with your broker to dispatch actions in your front-end application. The library is focused to work with [Workflow API Layer](https://github.com/flow-build/workflow-api).
4+
React MQTT Workflow Manager is a React component library designed to wrap all the [MQTT](https://mqtt.org/) sub-logic behind the scenes and must be used to work with [Workflow API Layer](https://github.com/flow-build/workflow-api). It only deals with events, not commands. The manager communicates with your broker to dispatch actions in your front-end application.
55

66
## Table of contents
77

@@ -36,7 +36,7 @@ npm i react@18 react-dom@18
3636
## [Usage](usage)
3737

3838

39-
1. Before the componente usage, set the store with `WorkflowManagerConfig.setStore`.
39+
1. Before using the component, set the store with `WorkflowManagerConfig.setStore`.
4040

4141
```tsx
4242
// App.tsx
@@ -85,7 +85,7 @@ export const App: React.FC = () => {
8585
};
8686
```
8787

88-
3. Lastly, set `workflowManagerReducer` to your store reducers.
88+
3. Lastly, set `workflowManagerReducer` on your store reducers.
8989

9090
```ts
9191
import { configureStore, createSlice } from '@reduxjs/toolkit';
@@ -105,34 +105,34 @@ export const store = configureStore({
105105

106106
## [Example of usage](example-of-usage)
107107

108-
See a complete example of usage [here](https://github.com/flow-build/react-mqtt-workflow-manager/tree/master/app/).
108+
A complete example of how to use it can be found [here](https://github.com/flow-build/react-mqtt-workflow-manager/tree/master/app/).
109109

110110
## [Properties](properties)
111111

112112
Property | Type | Required | Description
113113
--- | --- | --- | ---
114-
`brokerUrl` | *string* | false | URL to connect to broker. Use full URL like ws://
115-
`options` | *IClientOptions* | false | MQTT client options. See [MQTT.js](https://github.com/mqttjs/MQTT.js/blob/main/types/lib/client-options.d.ts).
114+
`brokerUrl` | *string* | true | URL to connect to broker. Use full URL like `wss://...`
115+
`options` | *IClientOptions* | false | MQTT client options. See options config [here](https://github.com/mqttjs/MQTT.js/blob/main/types/lib/client-options.d.ts).
116116

117117
## [WorkflowManagerConfig](workflowmanagerconfig)
118118

119-
The library also exposes methods and utilities for your commodity. They can be used out of the context of react components.
119+
The library also provides methods and utilities for your commodity. They can be used outside the context of react components.
120120

121121
### setStore(store)
122122

123-
The library use your redux store to dispatch actions. This is used to dispatch internal actions control and for your applications.
123+
The library uses your redux store to dispatch actions. This is used to control and dispatch internal actions for your application.
124124

125125
### getMqttClient()
126126

127-
A utility method to be used out of context to react components. Be careful; the method must be able to return `null` if an error happens when setting connect. [See here](https://github.com/mqttjs/MQTT.js/blob/main/README.md#client).
127+
A utility method that can be used outside the context of react components. Be careful; the method must be able to return `null` if an error occurs when setting connect. See client config [here](https://github.com/mqttjs/MQTT.js/blob/main/README.md#client).
128128

129129
### subscribe(topic/topic array/topic object, [options])
130130

131-
Works like exactly like [mqtt#subscribe](https://github.com/mqttjs/MQTT.js/blob/main/README.md#mqttclientsubscribetopictopic-arraytopic-object-options-callback), but the library implements validations and internal rules.
131+
Works exactly like [mqtt#subscribe](https://github.com/mqttjs/MQTT.js/blob/main/README.md#mqttclientsubscribetopictopic-arraytopic-object-options-callback), but the library implements validations and internal rules.
132132

133133
### subscribe(topic/topic array/topic object, [options])
134134

135-
Works like exactly like [mqtt#unsubscribe](https://github.com/mqttjs/MQTT.js/blob/main/README.md#mqttclientunsubscribetopictopic-array-options-callback), but the library implements validations and internal rules.
135+
Works exactly like [mqtt#unsubscribe](https://github.com/mqttjs/MQTT.js/blob/main/README.md#mqttclientunsubscribetopictopic-array-options-callback), but the library implements validations and internal rules.
136136

137137
## [Hooks](hooks)
138138

@@ -144,15 +144,15 @@ The hook returns a object contaning `client`, `status` and `error`.
144144

145145
Property | Type | Default value | Description
146146
--- | --- | --- | ---
147-
`client` | *MqttClient* | `null` | See type [here](https://github.com/mqttjs/MQTT.js/blob/main/types/lib/client.d.ts)
147+
`client` | *MqttClient* | `null` | See client [here](https://github.com/mqttjs/MQTT.js/blob/main/types/lib/client.d.ts).
148148
`status` | *string* | `offline` | `connecting`, `connected`, `disconnected`, `reconnecting`, `offline` or `error`.
149149
`error` | *Error* | `null` |
150150

151151
### useSubscribe()
152152

153153
Returns `WorkflowManagerConfig.subscribe` for your commodity.
154154

155-
### UseUnsubscribe()
155+
### useUnsubscribe()
156156

157157
Returns `WorkflowManagerConfig.unsubscribe` for your commodity.
158158

0 commit comments

Comments
 (0)