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

119
Vistas
How can I combine two object of this odd form?

I never thought about it but when using combinereducers, the syntax is odd:

const File = {
  Apex1,
  PeopleInput
};

const reducers = combineReducers(File);

Basically instead of inserting key, values into the {} you can just pass the single value of a function.

I tried doing this with strings and got an error. I.E. this syntax is not valid.

const Strings = {
  'foo',
  'boo'
}

I have two objects of the form in File that I need to combine. How can I go about doing this:

Can I use this method:

const combined = {
  ...File1,
  ...File2
};

This works with normal objects but I'm not sure about the form I mentioned above.

I'm trying to find some reference material on how objects behave without values and am not even sure it is supported:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects

However, this method is used in the redux docs:

https://redux.js.org/api/combinereducers

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