-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bcff59
commit 92a6ecd
Showing
8 changed files
with
70 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,40 @@ | ||
import { performToNextFiberFromRoot, performToNextFiberFromTrigger } from "../renderNextWork"; | ||
import { triggerFiberUpdateListener } from "../runtimeFiber"; | ||
|
||
import type { CustomRenderDispatch } from "../renderDispatch"; | ||
|
||
export const updateLoopSyncFromRoot = (renderDispatch: CustomRenderDispatch) => { | ||
while (renderDispatch.runtimeFiber.nextWorkingFiber) { | ||
const nextFiber = performToNextFiberFromRoot(renderDispatch.runtimeFiber.nextWorkingFiber, renderDispatch); | ||
const currentFiber = renderDispatch.runtimeFiber.nextWorkingFiber; | ||
const nextFiber = performToNextFiberFromRoot(currentFiber, renderDispatch); | ||
triggerFiberUpdateListener(renderDispatch, currentFiber); | ||
renderDispatch.runtimeFiber.nextWorkingFiber = nextFiber; | ||
} | ||
}; | ||
|
||
export const updateLoopSyncFromTrigger = (renderDispatch: CustomRenderDispatch) => { | ||
while (renderDispatch.runtimeFiber.nextWorkingFiber) { | ||
const nextFiber = performToNextFiberFromTrigger(renderDispatch.runtimeFiber.nextWorkingFiber, renderDispatch); | ||
const currentFiber = renderDispatch.runtimeFiber.nextWorkingFiber; | ||
const nextFiber = performToNextFiberFromTrigger(currentFiber, renderDispatch); | ||
triggerFiberUpdateListener(renderDispatch, currentFiber); | ||
renderDispatch.runtimeFiber.nextWorkingFiber = nextFiber; | ||
} | ||
}; | ||
|
||
export const updateLoopConcurrentFromRoot = (renderDispatch: CustomRenderDispatch) => { | ||
while (renderDispatch.runtimeFiber.nextWorkingFiber && !renderDispatch.shouldYield()) { | ||
const nextFiber = performToNextFiberFromRoot(renderDispatch.runtimeFiber.nextWorkingFiber, renderDispatch); | ||
const currentFiber = renderDispatch.runtimeFiber.nextWorkingFiber; | ||
const nextFiber = performToNextFiberFromRoot(currentFiber, renderDispatch); | ||
triggerFiberUpdateListener(renderDispatch, currentFiber); | ||
renderDispatch.runtimeFiber.nextWorkingFiber = nextFiber; | ||
} | ||
}; | ||
|
||
export const updateLoopConcurrentFromTrigger = (renderDispatch: CustomRenderDispatch) => { | ||
while (renderDispatch.runtimeFiber.nextWorkingFiber && !renderDispatch.shouldYield()) { | ||
const nextFiber = performToNextFiberFromTrigger(renderDispatch.runtimeFiber.nextWorkingFiber, renderDispatch); | ||
const currentFiber = renderDispatch.runtimeFiber.nextWorkingFiber; | ||
const nextFiber = performToNextFiberFromTrigger(currentFiber, renderDispatch); | ||
triggerFiberUpdateListener(renderDispatch, currentFiber); | ||
renderDispatch.runtimeFiber.nextWorkingFiber = nextFiber; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { MantineProvider } from "@mantine/core"; | ||
import * as React from "react"; | ||
import * as ReactDOM from 'react-dom/client' | ||
import * as ReactDOM from "react-dom/client"; | ||
|
||
import App from "./App.tsx"; | ||
import { theme } from "./theme.ts"; | ||
|
||
import "./index.css"; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
) | ||
|
||
<MantineProvider theme={theme}> | ||
<App /> | ||
</MantineProvider> | ||
</React.StrictMode> | ||
); |