Skip to main content
adicionou 50 caracteres ao conteúdo
Fonte Link
rLinhares
  • 8,1mil
  • 32
  • 29
  • 47

Boa noite, realizei um projeto de CRUD com NodeNode, ReactReact e MySQLMySQL, porém ao tentar criar rotas no front-endfront-end, está gerando o erro:

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.[![inserir a descrição da imagem aqui][1]][1]

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.[![inserir a descrição da imagem aqui][1]][1]

Conforme verificado no erro, tentei alterar o: useState "useState" para UseState "UseState" (letra maiúscula inicial), porém assim alterando a propriedade da função.

import React, { useState } from "react"
import './style.css';
import Axios from 'axios'

function register() {
    const [nomeReg, setNomeReg] = useState('')
    const [dateReg, setDateReg] = useState('')
    const [cpfReg, setCpfReg] = useState('')
    const [emailReg, setEmailReg] = useState('')
    const [senhaReg, setSenhaReg] = useState('') 

Quando o codigocódigo se tratava de uma unicaúnica rota estava funcionando corretamente.

Ao compilar o React:

src\pages\register.js
  Line 6:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 7:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 8:33:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 9:37:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 10:37:  React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks

Search for the keywords to learn more about each error.

Boa noite, realizei um projeto de CRUD com Node, React e MySQL, porém ao tentar criar rotas no front-end, está gerando o erro:

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.[![inserir a descrição da imagem aqui][1]][1]

Conforme verificado no erro, tentei alterar o: useState para UseState (letra maiúscula inicial), porém assim alterando a propriedade da função.

import React, { useState } from "react"
import './style.css';
import Axios from 'axios'

function register() {
    const [nomeReg, setNomeReg] = useState('')
    const [dateReg, setDateReg] = useState('')
    const [cpfReg, setCpfReg] = useState('')
    const [emailReg, setEmailReg] = useState('')
    const [senhaReg, setSenhaReg] = useState('') 

Quando o codigo se tratava de uma unica rota estava funcionando corretamente.

Ao compilar o React:

src\pages\register.js
  Line 6:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 7:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 8:33:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 9:37:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 10:37:  React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks

Search for the keywords to learn more about each error.

Boa noite, realizei um projeto de CRUD com Node, React e MySQL, porém ao tentar criar rotas no front-end, está gerando o erro:

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.[![inserir a descrição da imagem aqui][1]][1]

Conforme verificado no erro, tentei alterar o "useState" para "UseState" (letra maiúscula inicial), porém assim alterando a propriedade da função.

import React, { useState } from "react"
import './style.css';
import Axios from 'axios'

function register() {
    const [nomeReg, setNomeReg] = useState('')
    const [dateReg, setDateReg] = useState('')
    const [cpfReg, setCpfReg] = useState('')
    const [emailReg, setEmailReg] = useState('')
    const [senhaReg, setSenhaReg] = useState('') 

Quando o código se tratava de uma única rota estava funcionando corretamente.

Ao compilar o React:

src\pages\register.js
  Line 6:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 7:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 8:33:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 9:37:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 10:37:  React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks

Search for the keywords to learn more about each error.
adicionou 1690 caracteres ao conteúdo
Fonte Link

Boa noite, realizei um projeto de CRUD com Node, React e MySQL, porém ao tentar criar rotas no front-end, está gerando o erro:

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.inserir a descrição da imagem aqui[![inserir a descrição da imagem aqui][1]][1]

Conforme verificado no erro, tentei alterar o: useState para UseState (letra maiúscula inicial), porém assim alterando a propriedade da função.

import React, { useState } from "react"
import './style.css';
import Axios from 'axios'

function register() {
    const [nomeReg, setNomeReg] = useState('')
    const [dateReg, setDateReg] = useState('')
    const [cpfReg, setCpfReg] = useState('')
    const [emailReg, setEmailReg] = useState('')
    const [senhaReg, setSenhaReg] = useState('') 

Quando o codigo se tratava de uma unica rota estava funcionando corretamente.

Ao compilar o React:

src\pages\register.js
  Line 6:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 7:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 8:33:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 9:37:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 10:37:  React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks

Search for the keywords to learn more about each error.

Boa noite, realizei um projeto de CRUD com Node, React e MySQL, porém ao tentar criar rotas no front-end, está gerando o erro:

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.inserir a descrição da imagem aqui

Conforme verificado no erro, tentei alterar o: useState para UseState (letra maiúscula inicial), porém assim alterando a propriedade da função.

Boa noite, realizei um projeto de CRUD com Node, React e MySQL, porém ao tentar criar rotas no front-end, está gerando o erro:

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.[![inserir a descrição da imagem aqui][1]][1]

Conforme verificado no erro, tentei alterar o: useState para UseState (letra maiúscula inicial), porém assim alterando a propriedade da função.

import React, { useState } from "react"
import './style.css';
import Axios from 'axios'

function register() {
    const [nomeReg, setNomeReg] = useState('')
    const [dateReg, setDateReg] = useState('')
    const [cpfReg, setCpfReg] = useState('')
    const [emailReg, setEmailReg] = useState('')
    const [senhaReg, setSenhaReg] = useState('') 

Quando o codigo se tratava de uma unica rota estava funcionando corretamente.

Ao compilar o React:

src\pages\register.js
  Line 6:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 7:35:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 8:33:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 9:37:   React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks
  Line 10:37:  React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter  react-hooks/rules-of-hooks

Search for the keywords to learn more about each error.
Fonte Link

React Hook "useState" is called in function

Boa noite, realizei um projeto de CRUD com Node, React e MySQL, porém ao tentar criar rotas no front-end, está gerando o erro:

React Hook "useState" is called in function "register" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.inserir a descrição da imagem aqui

Conforme verificado no erro, tentei alterar o: useState para UseState (letra maiúscula inicial), porém assim alterando a propriedade da função.