Skip to content

Commit f56deea

Browse files
authored
fix: example syntax is invalid (#1059)
In js/ts, if you want an arrow function to return an object in an inline manner, it needs to be surrounded by parenthesis.
1 parent 7e7fda1 commit f56deea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/sovran/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const messages = createStore<MessageQueue>({
9999

100100
// Action to add new events
101101
const addMessage = (message: Message) => (state: MessageQueue) =>
102-
{ messages: [...state.messages, message] };
102+
({ messages: [...state.messages, message] });
103103

104104
// Register the store to listen to native events
105105
registerBridgeStore({

0 commit comments

Comments
 (0)