Error using Form from @unform/mobile #356
Comments
Tive o mesmo problema, atualizei o react para versão 17.0.1 e o react-dom também para a versão 17.0.1 e o problema acabou. |
@fermaiasoares Quando eu utilizo essa versão do React com Expo fica dando erro de 'Invalid hook call'... Parece que essa versão é incompatível com o Expo. |
Use a versão ^2.1.3 ao invés da ^2.1.4 e atualize o react para a v17. |
@Jonathansoufer também deu o mesmo erro com o Expo... |
Tive o mesmo problema, segue versões: "react": "16.13.1", |
Tive o mesmo problema, estava passando meu projeto de JS para TS, resolvi usar o unform e apareceu o erro: react: 16.13.1 => 16.13.1 funcionou a resposta do Jonathansoufer |
Tive esse problema esses dias e resolvi trocando para as versões: Espero que funcione pra ti. |
Guys, just giving feedback. I don't know if here on Github there is a field to put a solution in Issues. I did what @fermaiasoares suggested and it was enough. Pessoal, só dando o feedback. Não sei se aqui no Github tem algum campo pra colocar solução nas Issues. Eu fiz o que o @fermaiasoares sugeriu e foi suficiente.
|
Enviroment: Same issue here. I did the same thing, changed version of react / react-dom to 17.0.1 and @unform/core - @unform/mobile to 2.1.3 and didn't work. So I try with react / react-dom 17.0.1 and @unform/core - @unform/mobile 2.1.5 and worked. Tive o mesmo problema, troquei as versões react / react-dom pra 17.0.1 e @unform/core - @unform/mobile para 2.1.3 e não funcionou. Tentei com o react / react-dom 17.0.1 e @unform/core - @unform/mobile 2.1.5 e funcionou. |
Tive o mesmo problema aqui no react native. Resolvi conforme as respostas acima. |
@carlos-eugenio @bralandealmeida como ficou a versão de vocês do RN - React e @unform/mobile e /core ? to passando pelo msm problema... |
O que fiz foi baixar a versão pra 2.1.0 do unform e funcionou tranquilo... essa nova versão pede o React na versão 17 e ainda está em RC, portanto não mudei no React Native. |
@jjairojr estou usando o "react": "17.0.1". Uma alternativa pode ser a do @patricpfranca. Não cheguei a testar essa. Baixei a versão 2.3 do unform e também não rolou, então atualizei o react. |
Eu atualizei o react pra versão 17.0.1 e o unform pro 2.1.5 e resolveu. |
Guys don't want to sound rude, but English would be very much appreciated. Having to deal with issues is not fun, having to copy/paste entire thread to Google Translate is even less fun 🙂 For future english-speaking visitors of this issue; I can confirm that (at least as long as Expo does not update React Native version to 0.64 which supports React v17) reverting to @unform/mobile and @unform/core version 2.1.3 fixes this issue. |
@zigcccc dumb question |
@luizwhite You're correct yep, |
@zigcccc tks, it worked for me! Reverting @unform/mobile and @unform/core version to 2.1.3 fixes the issue |
|
Estou tomando o mesmo erro. |
Fazendo downgrade dos 2 unform pra 2.1.3 |
Hey guys, thanks for your patience! We have fixed the issue on #367, and Unform should work correctly with React 16 and 17. To get the latest update, just run: yarn add @unform/core@latest @unform/mobile@latest
# or,
npm install @unform/core@latest @unform/mobile@latest Also, while contributing to the project, always make sure to use English, following the guidelines. |
I installed with the command: and have these libs: "@unform/core": "^2.1.6",
"@unform/mobile": "^2.1.6",
"react": "16.13.1",
"react-native": "0.63.4", and keeps giving the following error:
|
I upgraded to the version and it worked normally |
I'm just delete my
finally reinstalled everything using and now it's work fine :) |
Obrigado pelas informações procedimento simples: yarn add @unform/core@2.1.3 @unform/mobile@2.1.3 |
It looks like the problem wasn't fixed correctly. 😞 I'll look at it again and release a new alpha version, so it's possible to test it out. Thanks for your help! |
I was facing this very problem after I recreated my |
Tried downgrade to 2.1.3 didn't work either :( |
this solution worked for me. |
Neither for me :/ But on the repo they linked an snak that uses "@unform/core": "1.9.8" and "@unform/mobile": "1.9.8" for expo": "~40.0.0", "react": "16.13.1" and "react-dom": "16.13.1". I download it an works fine, but dosen't on my project... This is very confusin, on the migration page they say Unform 2.0 added support for React Native. |
@leonamjlpaula thank you, his approach worked. |
Version 2.1.3 of @mobile and @core worked fine with React 16.13.1 here. The latest 2.1.6 still doesn't works with React 16. |
The same here. Expo with react 16.13.1 and unform 2.1.3 work, but unform 2.1.6 doesn't |
God |
I can confirm that the last version works with:
|
Works for me ✌️ |
This solution worked for me! Environment: |
This solution worked for me! Environment: |
This solution worked for me! Environment: |
Description of bug
So, when I use the Form component from the @unform library, the metro bundle accuses the following error:
_
_
To Reproduce
<Form onSubmit={anyFunction}> <Input /> <Button>Enviar</Button> </Form>
Expected behavior
The App to be builded without errors.
Exception or Error
Screenshots
Environment:
OS: Ubuntu
React 16.13.1
React Native 0.63.4
@unform/mobile 2.1.4
Additional context
The repository can be cloned on follow address: https://github.com/MullerEsposito/gobarber/tree/mobile
The text was updated successfully, but these errors were encountered: