Open Janpot opened 1 year ago
let me take a look.
because this line caused an infinite loop. Just in case I canβt find it so that just mark it.
@Janpot because setScopeBindings
will trigger a real-time render.
I tried the throttle function to limit real-time render and make a cache of many executions.
such as this picture that it needs real-time sometimes.
evalJsBindings
involves a lot of other functions.
perhaps I'm not good at react.
I would appreciate it if you can share your idea.
perhaps I'm not good at react.
Don't worry, this binding engine is the most complex piece of Toolpad. It's basically implementing a reactive system parallel to react. Its implementation is too intertwined with react hooks, and it's up for a rewrite. I wouldn't recommend working on it if you're just starting out on the codebase. It's not unimaginable we can only solve this issue with a deep refactor.
Duplicates
Latest version
Steps to reproduce πΉ
Steps:
String(Date.now())
Page yml with reproduction:
Current behavior π―
The input goes in an infinite loop reinitialising the default value over and over
Expected behavior π€
The default value gets initialised only once on page start
Context π¦
No response
Your environment π
No response