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

Missing FormContext warning #1261

Closed
wobsoriano opened this issue Mar 22, 2020 · 11 comments
Closed

Missing FormContext warning #1261

wobsoriano opened this issue Mar 22, 2020 · 11 comments
Labels
bug Something isn't working

Comments

@wobsoriano
Copy link

Hello, I am using ionic with react and I am getting Missing FormContext every time I type in any input.

Steps to reproduce the behavior:

  1. Just type anything in the email field in the sandbox provided

https://codesandbox.io/s/ionic-react-list-eiekh

Screen Shot 2020-03-22 at 1 54 44 PM

  • OS: Catalina
  • Browser: Chrome
  • Version: 80.0.3987.149
@wobsoriano wobsoriano changed the title Missing FormContext Missing FormContext warning Mar 22, 2020
@bluebill1049 bluebill1049 added the bug Something isn't working label Mar 22, 2020
@bluebill1049
Copy link
Member

bluebill1049 commented Mar 22, 2020

@kotarella1110 that's what i was referred to. remember that commit. it rings the bell now, it was useFormContext inside Controller.

@bluebill1049
Copy link
Member

i will remove this warning completely for now until we have a good solution for this. i will add a task into the project todo column as well.

@bluebill1049
Copy link
Member

bluebill1049 commented Mar 22, 2020

thanks @sorxrob i will release a patch in a sec. (waiting for the build to pass)

@wobsoriano
Copy link
Author

Thanks! That was fast.

@kotarella1110
Copy link
Member

@bluebill1049 Sorry. My fix was wrong.
This should call useFormContext only if the control prop was not passed to the Controller component.
I can fix this right away.

@bluebill1049
Copy link
Member

no worries at all @kotarella1110 take your time with it. we can release the fix next weekend.

@kotarella1110
Copy link
Member

Thanks. I create a PR to fix this tonight.

@kotarella1110
Copy link
Member

kotarella1110 commented Mar 22, 2020

I tried to fix this, but it seems difficult to fix due to the rules of hooks.

スクリーンショット 2020-03-22 21 34 32

@bluebill1049
Copy link
Member

yes correct @kotarella1110 let's park this for now :)

@colin-h
Copy link

colin-h commented Jul 2, 2020

+1 here. Also seeing lots of warnings even though I am passing control to useFieldArray.

 const { fields, append, remove } = useFieldArray({
    control,
    name,
  })

Screen Shot 2020-07-02 at 11 21 47 AM

@bluebill1049
Copy link
Member

+1 here. Also seeing lots of warnings even though I am passing control to useFieldArray.

 const { fields, append, remove } = useFieldArray({
    control,
    name,
  })

Screen Shot 2020-07-02 at 11 21 47 AM

which version? and need a codesandbox to reproduce te problem too.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants