Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

170
Visualizações
Adding data on a .jsx in REACT js

I work on my CV web and I do it on react. The web site works very well but I try now to create thanks to a web admin page a page where I can add experiences when I desir. The issue is the following sentence: I can create data but the data when I refresh the webpage on localhost disappears. as is : it desappers to be : need that this new experience be created and written on the constante. Is it normal ? My data is in a constant on my IDE and I call it on all my web page (bdd.jsx). I use a button whom defined the json structure I need thanks to a form and data stocked on useState and then I use the push method to do it. It works but data disappears when i refresh... :(

Maybe I'm wrong somewhere maybe it's easier in the otherway so thank you for your help.. Cyprien

**bdd.jsx**
const bdd = [
{
{
"id":1,
"nomFonction": "Consulting",
"nomEntreprise":"dogs ...",

},
{
"id":2,
"nomFonction": "Consulting",
"nomEntreprise":"dogs ...",

}
]


**page.js**
const [function,setFunction] = useState('');
const [company,setCompany] = useState('');

const handleExperiences = () => {
let value = 
{
"id":bdd.length,
"nomFonction":function,
"nomEntreprise":company,
}
bdd.push(value);
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda