Update docs
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> headers: { </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'Content-Type'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'application/json'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> body: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">JSON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">stringify</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ status: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'active'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><hr><h2 id="_5-why-use-fetch-instead-of-native-fetch" tabindex="-1">5. Why use <code>_fetch</code> instead of native Fetch? <a class="header-anchor" href="#_5-why-use-fetch-instead-of-native-fetch" aria-label="Permalink to "5. Why use `_fetch` instead of native Fetch?""></a></h2><ol><li><strong>Declarative UI</strong>: You define the "Loading", "Error", and "Success" templates once, and they swap automatically.</li><li><strong>No <code>useEffect</code> required</strong>: Since SigPro is natively reactive, you don't need lifecycle hooks to trigger re-renders; the signals handle it.</li><li><strong>Consistency</strong>: It follows the same <code>_prefix</code> pattern as the rest of the official plugin ecosystem.</li><li><strong>Automatic JSON Parsing</strong>: It assumes JSON by default and handles 404/500 errors by populating the <code>$error</code> signal.</li></ol></div></div></main><footer class="VPDocFooter" data-v-83890dd9 data-v-4f9813fa><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-4f9813fa><span class="visually-hidden" id="doc-footer-aria-label" data-v-4f9813fa>Pager</span><div class="pager" data-v-4f9813fa><a class="VPLink link pager-link prev" href="/sigpro/plugins/core.ui.html" data-v-4f9813fa><!--[--><span class="desc" data-v-4f9813fa>Previous page</span><span class="title" data-v-4f9813fa>@core UI Plugin</span><!--]--></a></div><div class="pager" data-v-4f9813fa><a class="VPLink link pager-link next" href="/sigpro/plugins/core.storage.html" data-v-4f9813fa><!--[--><span class="desc" data-v-4f9813fa>Next page</span><span class="title" data-v-4f9813fa>@core UI Storage</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api__.md\":\"BVVMY-2O\",\"api_html.md\":\"-lEpgX-Z\",\"api_mount.md\":\"eGRwkZvh\",\"api_quick.md\":\"Cy_XozKR\",\"api_tags.md\":\"33XeBTH-\",\"guide_getting-started.md\":\"D_gqopPp\",\"guide_why.md\":\"lyU7T5_c\",\"index.md\":\"BWH7zN4c\",\"plugins_core.debug.md\":\"CVHw_PN0\",\"plugins_core.fetch.md\":\"BIc8aMQh\",\"plugins_core.router.md\":\"bGFltJyy\",\"plugins_core.storage.md\":\"Bgu1q6YH\",\"plugins_core.ui.md\":\"DDLum7rv\",\"plugins_custom.md\":\"D2KGTblR\",\"plugins_quick.md\":\"ODjl7edh\",\"vite_plugin.md\":\"4TJA8cv0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"SigPro\",\"description\":\"Minimalist Reactive Library\",\"base\":\"/sigpro/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Guide\",\"link\":\"/guide/getting-started\"},{\"text\":\"Api\",\"link\":\"/api/quick\"}],\"sidebar\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"What is SigPro?\",\"link\":\"/\"},{\"text\":\"Why\",\"link\":\"/guide/why\"},{\"text\":\"Guide\",\"link\":\"/guide/getting-started\"}]},{\"text\":\"API Reference\",\"items\":[{\"text\":\"Quick Start\",\"link\":\"/api/quick\"},{\"text\":\"$\",\"link\":\"/api/$\"},{\"text\":\"$.html\",\"link\":\"/api/html\"},{\"text\":\"$.mount\",\"link\":\"/api/mount\"},{\"text\":\"Tags\",\"link\":\"/api/tags\"}]},{\"text\":\"Plugins\",\"items\":[{\"text\":\"Quick Start\",\"link\":\"/plugins/quick\"},{\"text\":\"@core Router Plugin\",\"link\":\"/plugins/core.router\"},{\"text\":\"@core UI Plugin\",\"link\":\"/plugins/core.ui\"},{\"text\":\"@core UI Fetch\",\"link\":\"/plugins/core.fetch\"},{\"text\":\"@core UI Storage\",\"link\":\"/plugins/core.storage\"},{\"text\":\"@core UI Debug\",\"link\":\"/plugins/core.debug\"},{\"text\":\"Custom\",\"link\":\"/plugins/custom\"}]},{\"text\":\"Vite Router Plugin\",\"items\":[{\"text\":\"Vite Plugin\",\"link\":\"/vite/plugin\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/natxocc/sigpro\"}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api__.md\":\"BVVMY-2O\",\"api_html.md\":\"-lEpgX-Z\",\"api_mount.md\":\"eGRwkZvh\",\"api_quick.md\":\"Cy_XozKR\",\"api_tags.md\":\"bOhL_sXH\",\"guide_getting-started.md\":\"B8z9KBy5\",\"guide_why.md\":\"lyU7T5_c\",\"index.md\":\"CkJYagmp\",\"plugins_core.debug.md\":\"C1g_y9ut\",\"plugins_core.fetch.md\":\"BIc8aMQh\",\"plugins_core.router.md\":\"A8Lvd23w\",\"plugins_core.storage.md\":\"huXK5aOE\",\"plugins_core.ui.md\":\"C_cJt9x8\",\"plugins_custom.md\":\"__3E6hTB\",\"plugins_quick.md\":\"ODjl7edh\",\"vite_plugin.md\":\"CEmBrTGY\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"SigPro\",\"description\":\"Minimalist Reactive Library\",\"base\":\"/sigpro/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Guide\",\"link\":\"/guide/getting-started\"},{\"text\":\"Api\",\"link\":\"/api/quick\"}],\"sidebar\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"What is SigPro?\",\"link\":\"/\"},{\"text\":\"Why\",\"link\":\"/guide/why\"},{\"text\":\"Guide\",\"link\":\"/guide/getting-started\"}]},{\"text\":\"API Reference\",\"items\":[{\"text\":\"Quick Start\",\"link\":\"/api/quick\"},{\"text\":\"$\",\"link\":\"/api/$\"},{\"text\":\"$.html\",\"link\":\"/api/html\"},{\"text\":\"$.mount\",\"link\":\"/api/mount\"},{\"text\":\"Tags\",\"link\":\"/api/tags\"}]},{\"text\":\"Plugins\",\"items\":[{\"text\":\"Quick Start\",\"link\":\"/plugins/quick\"},{\"text\":\"@core Router Plugin\",\"link\":\"/plugins/core.router\"},{\"text\":\"@core UI Plugin\",\"link\":\"/plugins/core.ui\"},{\"text\":\"@core UI Fetch\",\"link\":\"/plugins/core.fetch\"},{\"text\":\"@core UI Storage\",\"link\":\"/plugins/core.storage\"},{\"text\":\"@core UI Debug\",\"link\":\"/plugins/core.debug\"},{\"text\":\"Custom\",\"link\":\"/plugins/custom\"}]},{\"text\":\"Vite Router Plugin\",\"items\":[{\"text\":\"Vite Plugin\",\"link\":\"/vite/plugin\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/natxocc/sigpro\"}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user