Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Schedule, remove React-isms
Once the API stabilizes, we will move Schedule this into a separate repo. To promote adoption, especially by projects outside the React ecosystem, we'll remove all React-isms from the source and keep it as simple as possible: - No build step. - No static types. - Everything is in a single file. If we end up needing to support multiple targets, like CommonJS and ESM, we can still avoid a build step by maintaining two copies of the same file, but with different exports. This commit also refactors the implementation to split out the DOM- specific parts (essentially a requestIdleCallback polyfill). Aside from the architectural benefits, this also makes it possible to write host- agnostic tests. If/when we publish a version of Schedule that targets other environments, like React Native, we can run these same tests across all implementations.
- Loading branch information