4 ms·
No one should be asynchronously executing code on import? I'd rather my code call a function to kick it off.
by sieabahlpark 7y ago
No one should be asynchronously executing code on import? I'd rather my code call a function to kick it off.
- lewisl9029 7y agoPlease, this. Synchronous effectful imports are already are the source of so much frustration, and now we're adding asynchronicity to it? Just export a init function and let your users choose when/where to run your effectful initialization code, sync or async.