Skip to content

Commit ba3f8a4

Browse files
authored
Update code block in README
1 parent 087d380 commit ba3f8a4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Here's what I use:
3030
```ts
3131
const event = ReplicatedStorage.FindFirstChild("REFLEX_DEVTOOLS") as RemoteEvent
3232

33-
export const devToolsMiddleware: ProducerMiddleware<RootState, RootActions> = () => {
33+
const middleware: ProducerMiddleware<RootState, RootActions> = () => {
3434
return (nextAction, actionName) => {
3535
return (...args) => {
3636
const state = nextAction(...args)
@@ -42,6 +42,8 @@ export const devToolsMiddleware: ProducerMiddleware<RootState, RootActions> = ()
4242
}
4343
}
4444
}
45+
46+
export = middleware
4547
```
4648

4749
Whatever you do, fire the event an object that satisfies the following type:
@@ -59,14 +61,10 @@ interface DispatchedAction {
5961
```ts
6062
export const store = combineProducers({
6163
// ...
62-
}).applyMiddleware(devToolsMiddleware)
64+
}).applyMiddleware(devTools)
6365
```
6466

6567
## Why does it use RemoteEvents?
6668

6769
Couldn't get BindableEvents to be received by the Plugin.
6870
Context: https://discord.com/channels/385151591524597761/385151591998816257/1149590579529912320
69-
70-
## Attributions
71-
72-
Can be found in `package.json`

0 commit comments

Comments
 (0)