IMPORTANT: Autorun: run the algorithm and update the plots automatically without clicking on Run button
See original GitHub issueThis may include:
- debounce
run()
calls - hide feature behind the checkbox, disabled by default
Issues:
formik
does not allow to subscribe to the form state changes. It requires submit to be calledformik
does not expose the form state. We currently grab the state in validation callback, which arguably, is a hackformik
seem to be re-rendering the entire form on changing any field. This is a performance problem - In automatic mode editing fields is very uncomfortable. There are ways to workaround it, but I don’t want to introduce any more workarounds.
Solutions:
- Replace
formik
withredux-form
? It will require quite substantial changes, for example reimplementing the validation.
I posted a cry for help in the Formik’s chat: https://spectrum.chat/palmer/formik/retrieve-values-without-submit-re-rendering-covid-19-scientists-need-help~d595a68c-2090-4a16-8a21-6f0772ff48e7
The following gif shows how on changing one value the entire form including mitigation plot is being re-rendered:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Autoruns for Windows - Sysinternals - Microsoft Learn
This utility, which has the most comprehensive knowledge of auto-starting locations of any startup monitor, shows you what programs are ...
Read more >How to trigger form submit on change · Issue #1218 - GitHub
IMPORTANT : Autorun: run the algorithm and update the plots automatically without clicking on Run button neherlab/covid19_scenarios#17.
Read more >Autorun a Python script on windows startup - GeeksforGeeks
Autorun a Python script on windows startup · Step #1: Adding script to windows Startup folder. After the windows boots up it runs...
Read more >BioVinci User guide - BioTuring
Step 3: BioVinci has many examples that cover many common plots. Select the example of your interest, then click on the “Create” button....
Read more >Cluster data using k-means algorithm in the Live Editor
To have the task run automatically after any change, select the autorun button at the top-right of the task.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Once the graphs are drawn interactivity with the form is impaired. And this is regardless of manual Run click or auto Run. Just focusing different form inputs is sluggish. Stepping the counters is v. sluggish.
I’d be interested if this is seen by others with the current production site.
I’m playing with possible fix in this PR: https://github.com/neherlab/covid19_scenarios/pull/432/
(this is WIP, not polished yet)
The general idea is to keep latest params in memory (Singleton) during the debouncing period, and to allow components to fetch them when needed. Because sending them through the store causes re-rendering of everything.
Demo (test for comparison): https://covid19-scenarios-97ywlzg4y.now.sh/