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

Improve component prop documentation #4699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JakeSidSmith
Copy link

Makes it obvious that passing a function to the component prop does not treat it like a render prop, and it is in fact a component.

Previously not explicitly referring to this as a component and using camel case naming implied that this prop was treated as a render prop, and not rendered with React.createElement as stated just above.

I have used the same naming as the class component example, and appended "component" to references of "stateless function".

This has the added benefit that, when necessary, these components can be used without redux-form due to the capitalized first character e.g.

<MyField />

I've also changed "normal component" back to "class component" as both styles are equally "normal".

Make it obvious that passing a function to the component prop does not treat it like a render prop, and it is in fact a component
@codecov-io
Copy link

Codecov Report

Merging #4699 (c8e44f0) into master (f8b721b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@      Coverage Diff       @@
##   master   #4699   +/-   ##
==============================
==============================

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8b721b...88e1e52. Read the comment docs.

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