Skip to content

Commit

Permalink
Merge pull request #4 from rkrupinski/ios-fix
Browse files Browse the repository at this point in the history
Ios fix
  • Loading branch information
rkrupinski committed Jul 30, 2023
2 parents bc711b6 + ea05c47 commit 2c7577d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

An experimental, lightweight [React](https://react.dev/) alternative.

Table of contents:

- [Getting started](#getting-started)
- [Example](#example)

Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rkrupinski/react",
"description": "An experimental, lightweight React alternative.",
"version": "0.0.1-rc1",
"version": "0.0.1-rc2",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
8 changes: 7 additions & 1 deletion packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ const ROOT = Symbol('ROOT');
const TEXT = Symbol('TEXT');
const FRAGMENT = Symbol('FRAGMENT');

let scheduler = window.requestIdleCallback;
let scheduler: typeof requestIdleCallback =
window.requestIdleCallback ??
(cb => {
// eslint-disable-next-line n/no-callback-literal
cb({ timeRemaining: () => 1, didTimeout: false });
return 1;
});

let _nextUnitOfWork: Fiber | null;
let _currentRoot: Fiber | null = null;
Expand Down

0 comments on commit 2c7577d

Please sign in to comment.