Skip to content

form.Field children prop: Render props pattern with children as a function #476

Answered by dca123
arnaudbzn asked this question in Ideas
Discussion options

You must be logged in to vote

how to be with ESLint react/no-children-prop rule?

You can add this to your eslintrc.

	"rules": {
		"react/no-children-prop": [
			true,
			{
				"allowFunctions": true
			}
		]
	}

Alternatively you can do

<form.Field >
   {(field) => (<></>) }
</form.Field>

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@crutchcorn
Comment options

Comment options

You must be logged in to vote
2 replies
@dca123
Comment options

Answer selected by LeCarbonator
@JPGarCar
Comment options

Comment options

You must be logged in to vote
1 reply
@LeCarbonator
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
8 participants