Skip to content

Commit

Permalink
Fix readme basic example (#163)
Browse files Browse the repository at this point in the history
* docs: fix readme basic example
  • Loading branch information
Bnaya authored Aug 1, 2021
1 parent b783726 commit db607ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-cats-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bnaya/objectbuffer": patch
---

Fix readme basic example
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ const initialValue = {
};
// ArrayBuffer is created under the hood
const myObject = createObjectBuffer(
{},
// size in bytes
1024,
initialValue
);

const arrayBuffer = getUnderlyingArrayBuffer(myObject);

myObject.additionalProp = "new Value";
myObject.arr.push(2);

const arrayBuffer = getUnderlyingArrayBuffer(myObject);

```

## Play with it (codesandbox)
Expand Down

0 comments on commit db607ed

Please sign in to comment.