« first day (4237 days earlier)      last day (696 days later) » 

 
2 hours later…
1:47 AM
||> function foo(cb){
        cb();
        return 10;
    }
    let x;
    x = foo(()=>{
        console.log(x);
    });
 
@JBis 10 Logged: [ undefined ] Took: 42ms
 
||> function foo(cb){
    cb();
    return 10;
}
let x;
x = foo(()=>{
    setTimeout(() => {
        console.log(x);
    }, 500);
});
 
@JBis 'ReferenceError: setTimeout is not defined' Logged: [ ] Took: 1ms
 
 
2 hours later…
3:29 AM
@JBis?
 
4:09 AM
Hello , How to use Local Video Files in react js via api response. i passed video path like this " localhost:8000/videos/video_2.mp4 "
 
@Harry 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.
 
 
2 hours later…
6:34 AM
Uncaught SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.error (document_requester.js?v=256655cafd:71:33)                                                                                                                                                      can someone tell me how to solve this error ? I am new to javascript
 
@수마티 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.
 
 
1 hour later…
7:43 AM
@수마티 You're passing invalid JSON to JSON.parse
 
 
5 hours later…
12:44 PM
hey guys

I know I should use nextjs now (not just react tsss haha) but is there a template for nextjs with everything I need?
the way to go in 2022 ( in this week.. next week its outdated I know)
 
1:37 PM
I forgot all my React. I have an array of ArrayBuffers with jpeg data in state. I am .map'ing that to URL.createObjectURL every render, however I am supposed to clean that up by calling URL.revokeObjectURL(). How would I do this in React (hooks)?
useMemo or something?
I think it's useMemo + useEffect
Ok i think i got it nvm
 
1:58 PM
Maybe not hmm
const DisplaySelector: React.FunctionComponent = observer(() => {
    const thumbs = UIStore.thumbnails?.map((nativeThumb) => {
        const arrayBufferView = new Uint8Array(nativeThumb.data);
        const blob = new Blob([arrayBufferView], {
            type: 'image/jpeg',
        });
        return URL.createObjectURL(blob);
    });
UIStore.thumbnails is a mobx observable
I need to clean up the URL.createObject
 
 
1 hour later…
3:29 PM
@수마티 let's be mpre precise: what you are passing to JSON.parse is not a JSON string. Judging by the first char, though, you might need to check if you are passing anything to it
 
 
1 hour later…
4:35 PM
 
 
2 hours later…
6:31 PM
🚽
 
7:11 PM
posted on May 23, 2022 by Matt

The Stable channel is being updated to 101.0.4951.72 (Platform version: 14588.123.0) for most Chrome OS devices. This build contains a number of bug fixes and security updates. Systems will be receiving updates over the next several days. If you find new issues, please let us know by vising our forum or filing a bug. Interested in switching channels? Find out

 
 
3 hours later…
10:39 PM
this is so dumb
im getting a memory leak despite me releasing the memory
 
10:51 PM
react is leaking my memory :(
 

« first day (4237 days earlier)      last day (696 days later) »