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 · May be fixed by #3971

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

@erashu212 erashu212 linked a pull request May 13, 2024 that will close this issue
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 a pull request may close this issue.

1 participant