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

Terneries, espescially deeply nested ternaries, make code difficult to read. Please do not do this. #3954

Open
NyanHelsing opened this issue Feb 13, 2024 · 1 comment

Comments

@NyanHelsing
Copy link

? React.createElement(component as any, formikbag)
: render
? render(formikbag)
: children // children come last, always called
? isFunction(children)
? (children as (bag: FormikProps<Values>) => React.ReactNode)(
formikbag as FormikProps<Values>
)
: !isEmptyChildren(children)
? React.Children.only(children)
: null
: null}

@NyanHelsing NyanHelsing changed the title terneries espescially deeply nested ternaries, make code difficult to read. Please do not do this. Terneries, espescially deeply nested ternaries, make code difficult to read. Please do not do this. Feb 13, 2024
@NyanHelsing
Copy link
Author

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

No branches or pull requests

1 participant