Skip to content
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

Merged
merged 11 commits into from
Oct 27, 2021

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Oct 26, 2021

Details

  • Just trying to improve the Onyx docs here. The default merge() behavior for objects and arrays is a potential point of confusion.
  • Added a npm run build-docs script that will automatically generate an API.md with all public methods that Onyx has.

Related Issues

#83

Automated Tests

Linked PRs

@marcaaron marcaaron self-assigned this Oct 26, 2021
@marcaaron marcaaron marked this pull request as ready for review October 26, 2021 19:31
@marcaaron marcaaron requested a review from a team as a code owner October 26, 2021 19:31
@MelvinBot MelvinBot requested review from mountiny and removed request for a team October 26, 2021 19:32
@yuwenmemon yuwenmemon self-requested a review October 26, 2021 19:35
@Jag96 Jag96 self-requested a review October 26, 2021 19:51
Copy link
Contributor

@Luke9389 Luke9389 left a 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.

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
mountiny
mountiny previously approved these changes Oct 27, 2021
Copy link
Contributor

@mountiny mountiny left a 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 🙌

Copy link
Contributor

@Jag96 Jag96 left a 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be {Function}?

@yuwenmemon yuwenmemon merged commit 224e2ba into master Oct 27, 2021
@yuwenmemon yuwenmemon deleted the marcaaron-updateReadMeMerge branch October 27, 2021 20:44
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.

5 participants