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

Issue when using react #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrshawnhum
Copy link

Code snippet for browser i had errors with. Here is my solution. Also added to use a placeholder if primary_photo_cropped doesn't load an image(not all will)

Copy link
Contributor

@mloberg mloberg left a comment

Choose a reason for hiding this comment

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

I've made a couple notes. Thanks for helping improve the documentation!

@@ -39,6 +39,21 @@ pf.animal.search()
});
```

Another way if you have issues with the above code snippet and using React
Copy link
Contributor

Choose a reason for hiding this comment

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

This snippet better fits under the TypeScript/ES6 Module section. Do you want to replace that snippet with this one and then update the title to include React?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or we could also create a new Usage (React) section and add this and the jsx under that.

Copy link
Author

Choose a reason for hiding this comment

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

I personally would just completely replace the snippet with React example, but if you want to make a separate section for React that would be fine too.

Copy link
Contributor

Choose a reason for hiding this comment

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

React is different than browser, so I would keep it separate

Copy link
Author

Choose a reason for hiding this comment

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

sounds good!

@@ -70,6 +85,21 @@ client.animal.search()
});
```

## If using primary_photo_cropped, some dogs or cats won't have images. I recommend adding a placeholder like below example if using React
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wordy for a title

Copy link
Author

Choose a reason for hiding this comment

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

was just putting a disclaimer but you can adjust how you see fit

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps italicized would be better? _disclaimer text_

Copy link
Author

Choose a reason for hiding this comment

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

that or bold. Either way it would be better than just making it a title

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.

None yet

2 participants