Skip to content

Commit d25b3dd

Browse files
committed
Deploying to gh-pages from @ 20683e8 🚀
1 parent 53ff853 commit d25b3dd

File tree

29 files changed

+110
-150
lines changed

29 files changed

+110
-150
lines changed

404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
</div><div class="w-full min-h-0 p-4 hidden" style="background-color:#2b303b;"><pre style="background-color:#2b303b;">
150150
<span style="color:#65737e;">//! Encapsulate state in components.
151151
</span><span style="color:#65737e;">//!
152-
</span><span style="color:#65737e;">//! Use structs or autodderive props with `#[inline_props]`
152+
</span><span style="color:#65737e;">//! Use structs or autodderive props with `#[component]`
153153
</span><span style="color:#c0c5ce;">
154154
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">derive</span><span style="color:#c0c5ce;">(Props, PartialEq)]
155155
</span><span style="color:#b48ead;">struct </span><span style="color:#c0c5ce;">PropBased {
@@ -185,7 +185,7 @@
185185
</span><span style="color:#65737e;">//!
186186
</span><span style="color:#65737e;">//! Automatically tracks dependencies and caches results
187187
</span><span style="color:#c0c5ce;">
188-
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">inline_props</span><span style="color:#c0c5ce;">]
188+
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">component</span><span style="color:#c0c5ce;">]
189189
</span><span style="color:#b48ead;">fn </span><span style="color:#8fa1b3;">Tasks</span><span style="color:#c0c5ce;">(</span><span style="color:#bf616a;">cx</span><span style="color:#c0c5ce;">: Scope, </span><span style="color:#bf616a;">id</span><span style="color:#c0c5ce;">: Uuid) -&gt; Element {
190190
</span><span style="color:#c0c5ce;"> </span><span style="color:#b48ead;">let</span><span style="color:#c0c5ce;"> content = use_fetch!(cx, &quot;</span><span style="color:#a3be8c;">https://my.app.com/item/{id}</span><span style="color:#c0c5ce;">&quot;);
191191
</span><span style="color:#c0c5ce;">

assets/dioxus/docsite.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ function logError(f, args) {
263263
throw e;
264264
}
265265
}
266+
function __wbg_adapter_48(arg0, arg1) {
267+
_assertNum(arg0);
268+
_assertNum(arg1);
269+
wasm.wasm_bindgen__convert__closures__invoke0_mut__h7d875ca47af1fae8(arg0, arg1);
270+
}
266271

267272
let stack_pointer = 128;
268273

@@ -271,22 +276,16 @@ function addBorrowedObject(obj) {
271276
heap[--stack_pointer] = obj;
272277
return stack_pointer;
273278
}
274-
function __wbg_adapter_48(arg0, arg1, arg2) {
279+
function __wbg_adapter_51(arg0, arg1, arg2) {
275280
try {
276281
_assertNum(arg0);
277282
_assertNum(arg1);
278-
wasm.wasm_bindgen__convert__closures__invoke1_mut_ref__h6fcc1198b5a9d90b(arg0, arg1, addBorrowedObject(arg2));
283+
wasm.wasm_bindgen__convert__closures__invoke1_mut_ref__hf41a836504bc0fcd(arg0, arg1, addBorrowedObject(arg2));
279284
} finally {
280285
heap[stack_pointer++] = undefined;
281286
}
282287
}
283288

284-
function __wbg_adapter_51(arg0, arg1) {
285-
_assertNum(arg0);
286-
_assertNum(arg1);
287-
wasm.wasm_bindgen__convert__closures__invoke0_mut__hb4098f601f3c7bc4(arg0, arg1);
288-
}
289-
290289
function makeClosure(arg0, arg1, dtor, f) {
291290
const state = { a: arg0, b: arg1, cnt: 1, dtor };
292291
const real = (...args) => {
@@ -311,7 +310,7 @@ function makeClosure(arg0, arg1, dtor, f) {
311310
function __wbg_adapter_54(arg0, arg1, arg2) {
312311
_assertNum(arg0);
313312
_assertNum(arg1);
314-
wasm.wasm_bindgen__convert__closures__invoke1__h39940c16dfe1e0cf(arg0, arg1, addHeapObject(arg2));
313+
wasm.wasm_bindgen__convert__closures__invoke1__h4d90b3e2bc5510d3(arg0, arg1, addHeapObject(arg2));
315314
}
316315

317316
function __wbg_adapter_57(arg0, arg1) {
@@ -1529,24 +1528,24 @@ imports.wbg.__wbindgen_closure_wrapper582 = function() { return logError(functio
15291528
const ret = makeMutClosure(arg0, arg1, 125, __wbg_adapter_51);
15301529
return addHeapObject(ret);
15311530
}, arguments) };
1532-
imports.wbg.__wbindgen_closure_wrapper5793 = function() { return logError(function (arg0, arg1, arg2) {
1533-
const ret = makeClosure(arg0, arg1, 1627, __wbg_adapter_54);
1531+
imports.wbg.__wbindgen_closure_wrapper5754 = function() { return logError(function (arg0, arg1, arg2) {
1532+
const ret = makeClosure(arg0, arg1, 1608, __wbg_adapter_54);
15341533
return addHeapObject(ret);
15351534
}, arguments) };
1536-
imports.wbg.__wbindgen_closure_wrapper5832 = function() { return logError(function (arg0, arg1, arg2) {
1537-
const ret = makeMutClosure(arg0, arg1, 1631, __wbg_adapter_57);
1535+
imports.wbg.__wbindgen_closure_wrapper5794 = function() { return logError(function (arg0, arg1, arg2) {
1536+
const ret = makeMutClosure(arg0, arg1, 1612, __wbg_adapter_57);
15381537
return addHeapObject(ret);
15391538
}, arguments) };
1540-
imports.wbg.__wbindgen_closure_wrapper5880 = function() { return logError(function (arg0, arg1, arg2) {
1541-
const ret = makeMutClosure(arg0, arg1, 1637, __wbg_adapter_60);
1539+
imports.wbg.__wbindgen_closure_wrapper5842 = function() { return logError(function (arg0, arg1, arg2) {
1540+
const ret = makeMutClosure(arg0, arg1, 1618, __wbg_adapter_60);
15421541
return addHeapObject(ret);
15431542
}, arguments) };
1544-
imports.wbg.__wbindgen_closure_wrapper5894 = function() { return logError(function (arg0, arg1, arg2) {
1545-
const ret = makeMutClosure(arg0, arg1, 1655, __wbg_adapter_63);
1543+
imports.wbg.__wbindgen_closure_wrapper5856 = function() { return logError(function (arg0, arg1, arg2) {
1544+
const ret = makeMutClosure(arg0, arg1, 1636, __wbg_adapter_63);
15461545
return addHeapObject(ret);
15471546
}, arguments) };
1548-
imports.wbg.__wbindgen_closure_wrapper6136 = function() { return logError(function (arg0, arg1, arg2) {
1549-
const ret = makeMutClosure(arg0, arg1, 1726, __wbg_adapter_66);
1547+
imports.wbg.__wbindgen_closure_wrapper6098 = function() { return logError(function (arg0, arg1, arg2) {
1548+
const ret = makeMutClosure(arg0, arg1, 1707, __wbg_adapter_66);
15501549
return addHeapObject(ret);
15511550
}, arguments) };
15521551
imports['./snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js'] = __wbg_star0;

assets/dioxus/docsite_bg.wasm

-13 KB
Binary file not shown.

assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ let m,p,ls,d,t,op,i,e,z,metaflags;
169169
function truthy(val) {
170170
return val === "true" || val === true;
171171
}
172-
let u8buf,u8bufp;const evt = [];
172+
let u8buf,u8bufp;let s = "";let lsp,sp,sl; let c = new TextDecoder();const evt = [];
173173
let evt_tmp1, evt_tmp2;
174174
function get_evt() {
175175
evt_tmp2 = u8buf[u8bufp++];
@@ -181,7 +181,7 @@ let m,p,ls,d,t,op,i,e,z,metaflags;
181181
else{
182182
return evt[evt_tmp2&4294967167];
183183
}
184-
}let s = "";let lsp,sp,sl; let c = new TextDecoder();const attr = [];
184+
}const attr = [];
185185
let attr_tmp1, attr_tmp2;
186186
function get_attr() {
187187
attr_tmp2 = u8buf[u8bufp++];
@@ -206,7 +206,7 @@ let m,p,ls,d,t,op,i,e,z,metaflags;
206206
return ns_cache[ns_cache_tmp2&4294967167];
207207
}
208208
}let u32buf,u32bufp;
209-
let value,field,ptr,bubbles,id,len,ns,event_name;
209+
let ptr,bubbles,field,id,ns,event_name,value,len;
210210
export function create(r){
211211
d=r;
212212
}

blog/release-020/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ <h2 id="fermi-for-global-state-management">Fermi for Global State Management</h2
253253
}
254254
</code></pre>
255255
<h2 id="inline-props-macro">Inline Props Macro</h2>
256-
<p>For internal components, explicitly declaring props structs can become tedious. That&#39;s why we&#39;ve built the new <code>inline_props</code> macro. This macro lets you inline your props definition right into your component function arguments.</p>
257-
<p>Simply add the <code>inline_props</code> macro to your component:</p>
258-
<pre><code class="lang-rust"><span class="hljs-meta">#[inline_props]</span>
256+
<p>For internal components, explicitly declaring props structs can become tedious. That&#39;s why we&#39;ve built the new <code>component</code> macro. This macro lets you inline your props definition right into your component function arguments.</p>
257+
<p>Simply add the <code>component</code> macro to your component:</p>
258+
<pre><code class="lang-rust"><span class="hljs-meta">#[component]</span>
259259
fn Child<span class="hljs-params">&lt;'a&gt;</span>(
260260
<span class="hljs-symbol"> cx:</span> Scope,
261261
<span class="hljs-symbol"> name:</span> String,

blog/release-040/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ <h2 id="enum-router">Enum Router</h2>
335335
BlogPost { post: <span class="hljs-built_in">String</span> },
336336
}
337337

338-
<span class="hljs-meta">#[inline_props]</span>
338+
<span class="hljs-meta">#[component]</span>
339339
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">BlogPost</span></span>(cx: Scope, post: <span class="hljs-built_in">String</span>) {
340340
render!{ <span class="hljs-string">"Currently viewing: {post}"</span> }
341341
}
@@ -549,7 +549,7 @@ <h2 id="general-fixes">General Fixes</h2>
549549
<li>Several SSR and Hydration bugs were fixed including escaping text, and</li>
550550
<li>We have improved testing around Dioxus. We have added end to end tests for each platform and fuzzing tests for core libraries.</li>
551551
<li>Fix the provide context docs</li>
552-
<li>Fix trait bounds on generics with inline_props</li>
552+
<li>Fix trait bounds on generics with component</li>
553553
<li>Fix hot reloading in a workspace</li>
554554
<li>Fix anchor link for block-level elements</li>
555555
<li>Fix Guide link in README</li>

blog/templates-diffing/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ <h2 id="dioxus-shares-react-s-dna">Dioxus shares React’s DNA</h2>
173173
Doc { document: doc }
174174
}
175175

176-
<span class="hljs-meta">#[inline_props]</span>
176+
<span class="hljs-meta">#[component]</span>
177177
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">Doc</span></span>&lt;<span class="hljs-symbol">'a</span>&gt;(cx: Scope&lt;<span class="hljs-symbol">'a</span>&gt;, document: &amp;<span class="hljs-symbol">'a</span> SomeBigDocument) -&gt; Element {
178178
<span class="hljs-comment">// document is passed from a parent by reference!</span>
179179
<span class="hljs-comment">// no smart pointers required!</span>

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
</div><div class="w-full min-h-0 p-4 hidden" style="background-color:#2b303b;"><pre style="background-color:#2b303b;">
150150
<span style="color:#65737e;">//! Encapsulate state in components.
151151
</span><span style="color:#65737e;">//!
152-
</span><span style="color:#65737e;">//! Use structs or autodderive props with `#[inline_props]`
152+
</span><span style="color:#65737e;">//! Use structs or autodderive props with `#[component]`
153153
</span><span style="color:#c0c5ce;">
154154
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">derive</span><span style="color:#c0c5ce;">(Props, PartialEq)]
155155
</span><span style="color:#b48ead;">struct </span><span style="color:#c0c5ce;">PropBased {
@@ -185,7 +185,7 @@
185185
</span><span style="color:#65737e;">//!
186186
</span><span style="color:#65737e;">//! Automatically tracks dependencies and caches results
187187
</span><span style="color:#c0c5ce;">
188-
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">inline_props</span><span style="color:#c0c5ce;">]
188+
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">component</span><span style="color:#c0c5ce;">]
189189
</span><span style="color:#b48ead;">fn </span><span style="color:#8fa1b3;">Tasks</span><span style="color:#c0c5ce;">(</span><span style="color:#bf616a;">cx</span><span style="color:#c0c5ce;">: Scope, </span><span style="color:#bf616a;">id</span><span style="color:#c0c5ce;">: Uuid) -&gt; Element {
190190
</span><span style="color:#c0c5ce;"> </span><span style="color:#b48ead;">let</span><span style="color:#c0c5ce;"> content = use_fetch!(cx, &quot;</span><span style="color:#a3be8c;">https://my.app.com/item/{id}</span><span style="color:#c0c5ce;">&quot;);
191191
</span><span style="color:#c0c5ce;">

learn/0.4/contributing/walkthrough_readme/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
</span><span style="color:#c0c5ce;"> key: None,
239239
</span><span style="color:#c0c5ce;"> </span><span style="color:#65737e;">// The static template this node will use. The template is stored in a Cell so it can be replaced with a new template when hot rsx reloading is enabled
240240
</span><span style="color:#c0c5ce;"> template: std::cell::Cell::new(</span><span style="color:#d08770;">TEMPLATE</span><span style="color:#c0c5ce;">),
241-
</span><span style="color:#c0c5ce;"> root_ids: Default::default(),
241+
</span><span style="color:#c0c5ce;"> root_ids: dioxus::core::exports::bumpalo::collections::Vec::with_capacity_in(</span><span style="color:#d08770;">3</span><span style="color:#c0c5ce;">, __cx.</span><span style="color:#96b5b4;">bump</span><span style="color:#c0c5ce;">()).</span><span style="color:#96b5b4;">into</span><span style="color:#c0c5ce;">(),
242242
</span><span style="color:#c0c5ce;"> dynamic_nodes: __cx.</span><span style="color:#96b5b4;">bump</span><span style="color:#c0c5ce;">().</span><span style="color:#96b5b4;">alloc</span><span style="color:#c0c5ce;">([
243243
</span><span style="color:#c0c5ce;"> </span><span style="color:#65737e;">// The dynamic count text node (dynamic node id 0)
244244
</span><span style="color:#c0c5ce;"> __cx.</span><span style="color:#96b5b4;">text_node</span><span style="color:#c0c5ce;">(format_args!(&quot;</span><span style="color:#a3be8c;">High-Five counter: {0}</span><span style="color:#c0c5ce;">&quot;, count)),

learn/0.4/guide/data_fetching/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
</span><span style="color:#c0c5ce;"> }
249249
</span><span style="color:#c0c5ce;">}
250250
</span><span style="color:#c0c5ce;">
251-
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">inline_props</span><span style="color:#c0c5ce;">]
251+
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">component</span><span style="color:#c0c5ce;">]
252252
</span><span style="color:#b48ead;">fn </span><span style="color:#8fa1b3;">StoryListing</span><span style="color:#c0c5ce;">(</span><span style="color:#bf616a;">cx</span><span style="color:#c0c5ce;">: Scope, </span><span style="color:#bf616a;">story</span><span style="color:#c0c5ce;">: StoryItem) -&gt; Element {
253253
</span><span style="color:#c0c5ce;"> </span><span style="color:#b48ead;">let</span><span style="color:#c0c5ce;"> preview_state = use_shared_state::&lt;PreviewState&gt;(cx).</span><span style="color:#96b5b4;">unwrap</span><span style="color:#c0c5ce;">();
254254
</span><span style="color:#c0c5ce;"> </span><span style="color:#b48ead;">let</span><span style="color:#c0c5ce;"> StoryItem {

learn/0.4/guide/full_code/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
</span><span style="color:#c0c5ce;"> }
191191
</span><span style="color:#c0c5ce;">}
192192
</span><span style="color:#c0c5ce;">
193-
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">inline_props</span><span style="color:#c0c5ce;">]
193+
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">component</span><span style="color:#c0c5ce;">]
194194
</span><span style="color:#b48ead;">fn </span><span style="color:#8fa1b3;">StoryListing</span><span style="color:#c0c5ce;">(</span><span style="color:#bf616a;">cx</span><span style="color:#c0c5ce;">: Scope, </span><span style="color:#bf616a;">story</span><span style="color:#c0c5ce;">: StoryItem) -&gt; Element {
195195
</span><span style="color:#c0c5ce;"> </span><span style="color:#b48ead;">let</span><span style="color:#c0c5ce;"> preview_state = use_shared_state::&lt;PreviewState&gt;(cx).</span><span style="color:#96b5b4;">unwrap</span><span style="color:#c0c5ce;">();
196196
</span><span style="color:#c0c5ce;"> </span><span style="color:#b48ead;">let</span><span style="color:#c0c5ce;"> StoryItem {
@@ -312,7 +312,7 @@
312312
</span><span style="color:#c0c5ce;"> }
313313
</span><span style="color:#c0c5ce;">}
314314
</span><span style="color:#c0c5ce;">
315-
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">inline_props</span><span style="color:#c0c5ce;">]
315+
</span><span style="color:#c0c5ce;">#[</span><span style="color:#bf616a;">component</span><span style="color:#c0c5ce;">]
316316
</span><span style="color:#b48ead;">fn </span><span style="color:#8fa1b3;">Comment</span><span style="color:#c0c5ce;">(</span><span style="color:#bf616a;">cx</span><span style="color:#c0c5ce;">: Scope, </span><span style="color:#bf616a;">comment</span><span style="color:#c0c5ce;">: Comment) -&gt; Element&lt;</span><span style="color:#b48ead;">&#39;a</span><span style="color:#c0c5ce;">&gt; {
317317
</span><span style="color:#c0c5ce;"> render! {
318318
</span><span style="color:#c0c5ce;"> div {

0 commit comments

Comments
 (0)