diff --git a/examples/hello-world/package.json b/examples/hello-world/package.json
index 2a7f80f..b30b59b 100644
--- a/examples/hello-world/package.json
+++ b/examples/hello-world/package.json
@@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
+ "dayjs": "^1.11.10",
"react": "file://../../packages/react/pkg/react",
"react-dom": "file://../../packages/react-dom/pkg/react-dom",
"vite-plugin-wasm": "^3.3.0"
diff --git a/examples/hello-world/pnpm-lock.yaml b/examples/hello-world/pnpm-lock.yaml
index 298d563..b6ae9ec 100644
--- a/examples/hello-world/pnpm-lock.yaml
+++ b/examples/hello-world/pnpm-lock.yaml
@@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
dependencies:
+ dayjs:
+ specifier: ^1.11.10
+ version: 1.11.10
react:
specifier: file://../../packages/react/pkg/react
version: file:../../packages/react/pkg/react
@@ -1003,6 +1006,10 @@ packages:
which: 2.0.2
dev: true
+ /dayjs@1.11.10:
+ resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}
+ dev: false
+
/debug@4.3.4:
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
engines: {node: '>=6.0'}
diff --git a/examples/hello-world/src/App.tsx b/examples/hello-world/src/App.tsx
index c27e487..6786e83 100644
--- a/examples/hello-world/src/App.tsx
+++ b/examples/hello-world/src/App.tsx
@@ -1,10 +1,13 @@
-
-
+import dayjs from 'dayjs'
function App() {
- return (
-
a
- )
+ return (
+ {dayjs().format()}
+ )
+}
+
+function Comp({children}) {
+ return {`Hello world, ${children}`}
}
export default App
diff --git a/examples/hello-world/src/main.tsx b/examples/hello-world/src/main.tsx
index fa04a49..8f70611 100644
--- a/examples/hello-world/src/main.tsx
+++ b/examples/hello-world/src/main.tsx
@@ -1,6 +1,6 @@
import {createRoot} from 'react-dom'
+import App from './App.tsx'
-const comp =
const root = createRoot(document.getElementById("root"))
-root.render(comp)
+root.render()
diff --git a/packages/react-reconciler/src/begin_work.rs b/packages/react-reconciler/src/begin_work.rs
index 0fb1c55..879d46d 100644
--- a/packages/react-reconciler/src/begin_work.rs
+++ b/packages/react-reconciler/src/begin_work.rs
@@ -7,30 +7,37 @@ use shared::derive_from_js_value;
use crate::child_fiber::{mount_child_fibers, reconcile_child_fibers};
use crate::fiber::FiberNode;
+use crate::fiber_hooks::FiberHooks;
use crate::update_queue::process_update_queue;
use crate::work_tags::WorkTag;
-pub fn begin_work(work_in_progress: Rc>) -> Option>> {
+pub fn begin_work(work_in_progress: Rc>) -> Result