Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

123
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!