Skip to content

fix(readme): explain how this works with snapshot#180

Merged
dai-shi merged 3 commits into
masterfrom
fix/issue-178
Jul 29, 2021
Merged

fix(readme): explain how this works with snapshot#180
dai-shi merged 3 commits into
masterfrom
fix/issue-178

Conversation

@dai-shi

@dai-shi dai-shi commented Jul 22, 2021

Copy link
Copy Markdown
Member

close #178

@codesandbox-ci

codesandbox-ci Bot commented Jul 22, 2021

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 29a7d46:

Sandbox Source
React Configuration
React Typescript Configuration

Comment thread readme.md Outdated
#### Holding objects in state without tracking them

This may be useful if you have large, nested objects with accessors that you don't want to proxy. `ref` allows you to keep these objects inside the state model.
Plain objects and arrays are fully supported with proxy and snapshot. Objects with prototypes may not work for some cases with some unexpected errors. In such cases, you want to bypass tracking with `ref`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, it still sounds scary that correct behavior can't be ensured. I'd add a more precise reason.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, on second thought, this doesn't add any new insight. I will revert it.

@dai-shi dai-shi changed the title fix(readme): suggest ref for non plain objects fix(readme): explain how this works with snapshot Jul 24, 2021
@dai-shi dai-shi merged commit 85e74d6 into master Jul 29, 2021
@dai-shi dai-shi deleted the fix/issue-178 branch July 29, 2021 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frozen page when proxying an instance of EventEmitter

2 participants