-
I Don't know if I'm doing it wrong, but I do have this problem. Successful example # 1:
Successful example # 2:
Failure example # 1:
Failure example # 2: If I run this code,The animation will stop immediately
If my mdx has 20,000 lines, it will take about 700ms to compile, then the animation will continue to run at 700ms, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
New discovery: When the compile function is used, all js events and css renderings temporarily stop working. Maybe I insisted on compiling on the front end, but the official design was to compile back on the back end?Because I've done some processing, it's very convenient to compile on the front end, but I don't want it to stop working for a while |
Beta Was this translation helpful? Give feedback.
-
I have no clue what your examples mean? This isn’t real code? What is Is this about how to use
Sorry but what why how do you expect to compile 20k lines of MDX on the client in the same thread and think it’s all going to run smoothly? That’s how code works: if you write an infinite loop, the entire thread is blocked, because it uses the entire thread. |
Beta Was this translation helpful? Give feedback.
I have no clue what your examples mean? This isn’t real code? What is
Loading
? Why do you use axios?Is this about how to use
await
in React?Sorry but what why how do you expect to compile 20k lines of MDX on the client in the same thread and think it’s all going to run smoothly?
It is intended that code uses as much of a thread as possible.
If you want different threads, use different threads!
That’s how code works: if you write an infinite loop, the entire thread is blocked, because it uses the entire thread.