I’m building a custom widget with React for use in Monday.com. As it’s a widget, it will appear on a dashboard. Since dashboards can be connected to other boards, I want my widget to be able to access the specific boards that the dashboard (on which it appears) is connected to. In other words, is there is a way for a custom widget to access the board IDs of specifically the board(s) the dashboard is connected to?
Thank you for the response! I did actually try the monday.listen(“context”, …) function, but I got the error: “TypeError: monday.listen is not a function”. Do you have any tips or a working example?
Thank you! It works. I think I just had it in the wrong place in my program. I appreciate the help.
One last question that’s not fully related but has been bugging me: when I run “mapps code:push” to push my local changes to Monday.com and deploy the app, it takes much longer than it’s supposed to (~360 seconds instead of 30-60). I’m wondering if that’s because it’s trying to push my node_modules folder too – is there a way to prevent that? Or a way to speed up this process in general so that it doesn’t take five or six minutes every time I make a change locally until I can test on Monday.com?
Okay, and there’s no way to speed that up? (I haven’t changed any of the deploy settings.)
Also, where should I put the monday.listen() call? I’ve tried including it both outside and inside my React useEffect() hook and either way it seems to be running incredibly frequently because, to test, I have it log the res.data to the console in the callback function, and it prints hundreds of thousands of times… and can crash the tab . Is that normal/what should I change?