Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Update README #153

Merged
merged 3 commits into from
Oct 15, 2019
Merged

Update README #153

merged 3 commits into from
Oct 15, 2019

Conversation

TejasQ
Copy link
Contributor

@TejasQ TejasQ commented Oct 7, 2019

Why

We have amazing things but they're undocumented. This aims to fix #146.

@contiamo contiamo deleted a comment from contiamo-ci Oct 7, 2019
README.md Outdated
resolve: image => image && image.message,
});

return <img alt="Here's a good boye!" src={imageUrl} />;
Copy link
Contributor

Choose a reason for hiding this comment

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

this will show broken image for a moment, not sure if it matters for the exampls

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So would you suggest

Suggested change
return <img alt="Here's a good boye!" src={imageUrl} />;
return imageUrl && <img alt="Here's a good boye!" src={imageUrl} />;

?

README.md Outdated
{loading ? (
"Deleting..."
) : (
<a
Copy link
Contributor

Choose a reason for hiding this comment

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

use button instead of onClick={e => { e.preventDefault();?

README.md Outdated
```

`Mutate` is strongly typed, and provides intelligent autocompletion out of the box, complete with available verbs and other self-documentation.
`useMutate` is strongly typed, and provides intelligent autocompletion out of the box, complete with available verbs et al.
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
`useMutate` is strongly typed, and provides intelligent autocompletion out of the box, complete with available verbs et al.
`useMutate` is strongly typed, and provides intelligent autocompletion out of the box, complete with available verbs etc.

My guess et al. is less know than etc. or and others.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
`useMutate` is strongly typed, and provides intelligent autocompletion out of the box, complete with available verbs et al.
`useMutate` is strongly typed, and provides intelligent autocompletion out of the box, complete with available verbs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's just drop it.

README.md Outdated

- an `interval` prop that will poll at a specified interval (defaults to polling 1 second), and
- an `until` prop that accepts a condition expressed as a function that returns a boolean value. When this condition is met, polling will stop.
- the signature of this function is `(data: T, response: Response) => boolean`. As a developer, you have access to the returned data, along with the response object in case you'd like to stop polling if `response.ok === false`, for example.
- the signature of this function is `(data: T, response: ResponseInit) => boolean`. As a developer, you have access to the returned data, along with the response object in case you'd like to stop polling if `response.ok === false`, for example.
Copy link
Contributor

Choose a reason for hiding this comment

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

not part of the list. Make it a paragraph

README.md Outdated

#### [Full `Poll` Component API](src/Poll.tsx#L53-L101)

### Code Generation

Restful React is able to generate _type-safe_ React components from any valid OpenAPI v3 or Swagger v2 specification, either in `yaml` or `json` formats.
`restful-react` is able to generate _type-safe_ React components from any valid OpenAPI v3 or Swagger v2 specification, either in `yaml` or `json` formats.
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
`restful-react` is able to generate _type-safe_ React components from any valid OpenAPI v3 or Swagger v2 specification, either in `yaml` or `json` formats.
`restful-react` is able to generate React components with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in `yaml` or `json` formats.

?

stereobooster
stereobooster previously approved these changes Oct 8, 2019
Copy link
Contributor

@stereobooster stereobooster left a comment

Choose a reason for hiding this comment

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

Some small comments, otherwise looks nice

Copy link
Contributor

@mpotomin mpotomin left a comment

Choose a reason for hiding this comment

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

Looks like the demo link is broken :/


[![Edit Restful React demos](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/30n66z45mq)
[![Edit restful-react demos](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/restful-react-demos-vjets)
Copy link
Contributor

Choose a reason for hiding this comment

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

This Demo on Codesandbox is broken

Screenshot 2019-10-15 at 15 34 06

Copy link
Contributor Author

@TejasQ TejasQ Oct 15, 2019

Choose a reason for hiding this comment

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

Fixed!


Consider,

[![Edit Restful React demos](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/30n66z45mq)
[![Edit restful-react demos](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/restful-react-demos-vjets)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same demo link as the the one above. is it intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor

@mpotomin mpotomin left a comment

Choose a reason for hiding this comment

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

🔥

@TejasQ TejasQ merged commit 5e4f042 into master Oct 15, 2019
@TejasQ TejasQ deleted the update-docs-2 branch October 15, 2019 13:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better docs / examples
3 participants