You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
Providing one long string is susceptible to unintended consequences from indentation rules (e.g. markdown interpreting 4 spaces as a code block). Being able to provide an array of strings would help avoid that problem somewhat.
Seems like we could just do children.join('\n') when children is an array?
@chriddyp happy to submit a PR if you think this is worthwhile (not sure how to set propTypes so that both an array and a string would be acceptable).
The text was updated successfully, but these errors were encountered:
yeah, that's a good idea. sure, I'll accept a PR on this. See https://reactjs.org/docs/typechecking-with-proptypes.html for more on proptypes. PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]) should work here.
Providing one long string is susceptible to unintended consequences from indentation rules (e.g. markdown interpreting 4 spaces as a code block). Being able to provide an array of strings would help avoid that problem somewhat.
Seems like we could just do
children.join('\n')
whenchildren
is an array?@chriddyp happy to submit a PR if you think this is worthwhile (not sure how to set
propTypes
so that both an array and a string would be acceptable).The text was updated successfully, but these errors were encountered: