docs: big updates to the reference
This commit is contained in:
1 parent
caf772cf24
commit
583fdfa561
57 files changed
+726
-247
No files matched your search
+16
-16
@@ -12,7 +12,7 @@ https://github.com/rustwasm/gloo
|
||||
For example, resize observer would function like this:
|
||||
|
||||
```rust
|
||||
static Example: FC<()> = |cx| {
|
||||
pub static Example: FC<()> = |cx| {
|
||||
let observer = use_resize_observer();
|
||||
|
||||
cx.render(rsx!(
|
||||
@@ -29,18 +29,18 @@ For other services, we shell out to gloo. If the gloo service doesn't exist, the
|
||||
|
||||
| Service | Hook examples | Current Projects |
|
||||
| ---------------------------- | ------------- | ---------------- |
|
||||
| Fetch | 👀 | Reqwest/surf |
|
||||
| Local storage (cache) | 👀 | Gloo |
|
||||
| Persistent storage (IndexDB) | 👀 | 👀 |
|
||||
| WebSocket | 👀 | Gloo |
|
||||
| 3D Renderer / WebGL | 👀 | Gloo |
|
||||
| Web Worker | 👀 | 👀 |
|
||||
| Router | 👀 | 👀 |
|
||||
| Notifications | 👀 | 👀 |
|
||||
| WebRTC Client | 👀 | 👀 |
|
||||
| Service Workers | 👀 | 👀 |
|
||||
| Resize Observer | 👀 | 👀 |
|
||||
| Canvas | 👀 | 👀 |
|
||||
| Clipboard | 👀 | 👀 |
|
||||
| Fullscreen | 👀 | 👀 |
|
||||
| History API | 👀 | 👀 |
|
||||
| Fetch | 👀 | Reqwest/surf |
|
||||
| Local storage (cache) | 👀 | Gloo |
|
||||
| Persistent storage (IndexDB) | 👀 | 👀 |
|
||||
| WebSocket | 👀 | Gloo |
|
||||
| 3D Renderer / WebGL | 👀 | Gloo |
|
||||
| Web Worker | 👀 | 👀 |
|
||||
| Router | 👀 | 👀 |
|
||||
| Notifications | 👀 | 👀 |
|
||||
| WebRTC Client | 👀 | 👀 |
|
||||
| Service Workers | 👀 | 👀 |
|
||||
| Resize Observer | 👀 | 👀 |
|
||||
| Canvas | 👀 | 👀 |
|
||||
| Clipboard | 👀 | 👀 |
|
||||
| Fullscreen | 👀 | 👀 |
|
||||
| History API | 👀 | 👀 |
|
||||
@@ -153,13 +153,13 @@ Notice that LiveComponent receivers (the client-side interpretation of a LiveCom
|
||||
The `VNodeTree` type is a very special type that allows VNodes to be created using a pluggable allocator. The html! macro creates something that looks like:
|
||||
|
||||
```rust
|
||||
static Example: FC<()> = |cx| {
|
||||
pub static Example: FC<()> = |cx| {
|
||||
html! { <div> "blah" </div> }
|
||||
};
|
||||
|
||||
// expands to...
|
||||
|
||||
static Example: FC<()> = |cx| {
|
||||
pub static Example: FC<()> = |cx| {
|
||||
// This function converts a Fn(allocator) -> VNode closure to a VNode struct that will later be evaluated.
|
||||
html_macro_to_vnodetree(move |allocator| {
|
||||
let mut node0 = allocator.alloc(VElement::div);
|
||||
|
||||
Reference in new issue
Block a user