jahilldev / component-elements

Create a custom element from any component with these tiny functions (2KB GZipped, ~1KB Brotli). Preact and React currently supported
MIT License
89 stars 7 forks source link

Remove async keyword usage #6

Closed jahilldev closed 2 years ago

jahilldev commented 2 years ago

Refactored onConnected function to remove use of async/await. This was causing the inclusion of the regenerator runtime, adding significant weight to the built file.

Before: 7.6KB (3KB Gzip) After: 6.28KB (2KB Gzip)