« first day (3978 days earlier)      last day (1195 days later) » 

00:55
Hi, anyone is comfortable with useReducer from React.js?
@user2420374 Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
11 hours later…
11:38
Hey
 
1 hour later…
12:49
Can someone guide or share a link on how to create a typescript template project?
 
2 hours later…
14:24
I have two objects:

const a = {1: 2}
const b = {1: {3: 4}}

I'd like to merge them to:

{1: {2: null, 3: 4}}

Here's what I'm working with:
@duhaime Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
const merge = (source, target) => {
  for (const key in target) {
    if (target[key] instanceof Object) {
      Object.assign(source[key], merge(source[key], target[key]));
    }
  }
  return Object.assign(source, target);
}

const a = {1: 3}
const b = {1: {2: 4}}
P.S. That bot's instructions are not clear, the message should be updated
What's unclear?
(@duhaime)
the JamesBot's guide to code formatting. It should say something like: Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post...
The instructions are out of order and it's unclear what Ctrl + K does currently
14:39
@JBis ^ I guess that's a fair point
 
2 hours later…
16:21
I have a vue3 project, written in typescript, and build through vite. When running the development server, everythings works fine. When I build for production, parts of the javascript (not all) fail to work. A certain component fails to update, even though, from my perspective, it should. The build is successful, I suspect the issues stems from somewhere of the minified javascript or rollup. But there are no errors, and I have no clue how to even debug this.
Has anyone experienced something similar? How would you tackle such a problem? (At the moment, I am in no position to create a MCVE, so hence I am asking here a bit more broadly than I would as a question on stackoverflow ^^)

« first day (3978 days earlier)      last day (1195 days later) »