- )
-}
-
-render(, document.getElementById("root"))
-```
-
### props
Props are used for component communication
@@ -309,7 +272,6 @@ const Box = props =>
{props.children("hello world!")}
If you want to rewrite any function, please use options, such as:
```js
-options.end = false
options.commitWork = fiber => {
// something you will rewrite commitWork
}
@@ -331,7 +293,7 @@ import { h } from "fre"
If browser environment, recommend to use [htm](https://github.com/developit/htm)
-#### Concurrent Mode
+#### Concurrent
Fre implements a tiny priority scheduler, which like react Fiber.
It can break the work, and when there are idle time, the work will continue.
diff --git a/demo/useContext.js b/demo/useContext.js
index 06d944f4..38482bd0 100644
--- a/demo/useContext.js
+++ b/demo/useContext.js
@@ -1,36 +1,13 @@
-import { createContext, useContext, render, h } from '../src'
-
-const ctx = createContext(0)
+import { useContext, Context, render, h } from 'fre'
function App () {
- const [count, setCount] = useContext(ctx)
- return (
-