注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
本帖最后由 匿名 于 2022-9-1 10:58 编辑
recruiter态度也很享一下
Glassdoor上还说欠薪- const socket = new WebSocket( /* ... */ )
- /** initialization, setup, etc. */
- socket.addEventListener('message', function(event) {
- const message = event.data.message;
- switch (message.type) {
- case 'type1':
- dispatch(new Action1());
- break;
- case 'type2':
- dispatch(new Action2());
- break;
- case 'type3':
- dispatch(new Action3());
- break;
- default:
- return;
- }
- });
- /**
- * Task:
- * During performance investigation, you realize
- * that the the websocket receives ~5-10 messages a second
- * and React update cycle in response to the dispatch takes
- * 150 ms. Suggest possible solutions.
- */
复制代码 |