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

121
Visualizações
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 à 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