Skip to content

Commit

Permalink
add ref modifier to searchResults
Browse files Browse the repository at this point in the history
technically this is more accurate as fromPromise returns promise with some fields being already observable, so there's no need to wrap the whole return value in another observable
  • Loading branch information
vonovak committed Feb 25, 2020
1 parent c0c8065 commit 1778933
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ This is useful to replace one promise based observable with another, without goi
```javascript
@observer
class SearchResults extends React.Component {
@observable searchResults
@observable.ref searchResults

componentDidUpdate(nextProps) {
if (nextProps.query !== this.props.query)
Expand Down

0 comments on commit 1778933

Please sign in to comment.