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

216
Vistas
How to set array in redux toolkit?

I dont know how to change Starter or any kind of key's value in the player? If the player is not a array i know how to do,but i have no idea about how to set array's value.(I guess this may use filter but i don't know actually how to do)

const playerSlice = createSlice({
    name: "player",
    initialState:{
        player:[
         {
           Name: 'cc',
           Starter:true,
           key:'1',
         },
        ]
   },
 
    reducers: {
        setPlayer:(state,action){
        //how to set Starter?
        }
    }

});
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you want to set the starter-property of the first player in the array, you can access that at index 0.

state.player[0].Starter = false
about 4 years ago · Juan Pablo Isaza Denunciar
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