-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API reference. Update Onyx docs to explain current merge() behavior. #106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I left a few questions that may be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent improvement! Great job, this is now very useful resource and it is great to make the difference between merge
and set
clear. I tried hard to find some typos or what could be improved, but haven't noticed anything 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minor suggestions, but looks great!
README.md
Outdated
|
||
## Initialization | ||
|
||
To initialize Onyx we call `Onyx.init()` with a configuration object like so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To initialize Onyx we call `Onyx.init()` with a configuration object like so | |
To initialize Onyx we call `Onyx.init()` with a configuration object. |
README.md
Outdated
@@ -65,7 +195,7 @@ If you wish to reset the metrics and start over use `Onyx.resetMetrics()` | |||
Finally, there's a `Onyx.printMetrics()` method which prints human statistics information on the dev console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a .
here, or combine w/ `You can use this method during debugging.
README.md
Outdated
@@ -65,7 +195,7 @@ If you wish to reset the metrics and start over use `Onyx.resetMetrics()` | |||
Finally, there's a `Onyx.printMetrics()` method which prints human statistics information on the dev console | |||
You can use this method during debugging. For example add an `Onyx.printMetrics()` line somewhere in code or call it | |||
through the dev console. It supports 3 popular formats *MD* - human friendly markdown, *CSV* and *JSON* | |||
The default is MD if you want to print another format call `Onyx.printMetrics({ format: 'csv' })` or | |||
The default is MD if you want to print another format call `Onyx.printMetrics({ format: 'csv' })` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a .
before this sentence
lib/Onyx.js
Outdated
* This is used by React components to connect to Onyx | ||
* @param {object} [mapping.callback] a method that will be called with changed data | ||
* @param {Object} [mapping.callback] a method that will be called with changed data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be {Function}
?
Details
merge()
behavior for objects and arrays is a potential point of confusion.npm run build-docs
script that will automatically generate anAPI.md
with all public methods that Onyx has.Related Issues
#83
Automated Tests
❌
Linked PRs
❌