But seriously: The goal of a widget is usually bundle size and compatibility, so make sure to keep things small and make sure you're not using any modern browser API (or make the use of it progressive, so the app never fails). Preferably don't use any frameworks or large libraries (which is why I recommend Preact over React, since it's smaller minified).
You'd also probably want only one bundle, so you have to configure your compiler/bundler not to code split (if it's setup to do so automatically). Here's a StackOverflow post that outlines how to accomplish the widget bundling process for CDNs.
Keep the code lean and mean, don't add any unnecessary logging or processes.
Gijo Varghese
A WordPress speed enthusiast
I've created a
subscription boxas well aschat widgetusing React.You should check out Preact-habitat as well as cleanslatecss. They both come very handful in creating widgets