Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

169
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda