Closed isopen closed 5 years ago
You can see one such implementation in https://evgeny-nadymov.github.io/telegram-react/. We will make corresponding npm package public after it is fully-documented and we implement other pending TDLib tasks.
Great example of use, but there are moments. For example, the CPU load is 100% after reloading the page. The first start on a mobile device is very long. On the PC, the first launch is also not fast. Maybe we should think about lazy loading? (If it is even possible in this case)
@isopen hey, I got a new problem, I just like https://evgeny-nadymov.github.io/telegram-react/ to use tdweb, but when I run my project, I just got a error in my console: Manifest: Line: 1, column: 1, Syntax error. Uncaught SyntaxError: Unexpected token '<' And I think it is because teweb.js line 231: new Worker(xxxx.worker.js), but I have no idea how to fix it. And I use create-react-app to create my project. So have any idea about that? Thanks for your time
Mode wasm or js?
Possible case of invalid json in Manifest.
Mode wasm or js? js
js slows down more than wasm. I use wasm in my project
js slows down more than wasm. I use wasm in my project
Wait, I use the npm tdweb, and the tdweb.js import the wasm.
@isopen hey, I got a new problem, I just like https://evgeny-nadymov.github.io/telegram-react/ to use tdweb, but when I run my project, I just got a error in my console: Manifest: Line: 1, column: 1, Syntax error. Uncaught SyntaxError: Unexpected token '<' And I think it is because teweb.js line 231: new Worker(xxxx.worker.js), but I have no idea how to fix it. And I use create-react-app to create my project. So have any idea about that? Thanks for your time
This issue is because you are trying to load your service worker file from a different root directory. Since you are using create-react-app, you need to make sure your service worker is being placed in your 'public' folder and can be accessed by pasting its full url in the browser. If you can't access it, then you'll see the error you are seeing because create-react-app tries to load index.html first. Nothing to do with manifest issue.
Guys. Does anyone have a implementation in web worker? https://github.com/tdlib/td/issues/18