This commit is contained in:
@@ -119,7 +119,7 @@ When `destroy()` is called (or when a new mount replaces an old one), everything
|
||||
## Complete Example
|
||||
|
||||
```javascript
|
||||
import 'sigpro';
|
||||
import { $, mount } from 'sigpro';
|
||||
|
||||
|
||||
const App = () => {
|
||||
|
||||
@@ -97,7 +97,7 @@ h('div', {}, [
|
||||
|
||||
### Tag shortcuts
|
||||
|
||||
Tag helpers are **not exported individually** from the core. To use them globally without the `h(...)` wrapper, activate the side‑effect module:
|
||||
Tag helpers **are exported** from the core.
|
||||
|
||||
```javascript
|
||||
import "sigpro"
|
||||
@@ -224,7 +224,7 @@ You never need to manually clean up – just write reactive code.
|
||||
## Full Example – Counter with Persistence
|
||||
|
||||
```javascript
|
||||
import 'sigpro';
|
||||
import { $, mount } from 'sigpro';
|
||||
|
||||
const count = $(0, 'counter') // persists in localStorage
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ If you want the router outlet to have no layout impact, you can set `display: co
|
||||
## Complete Example
|
||||
|
||||
```javascript
|
||||
import 'sigpro';
|
||||
import { mount } from 'sigpro';
|
||||
|
||||
const Home = () => div("Welcome home");
|
||||
const About = () => div("About us");
|
||||
|
||||
@@ -29,10 +29,10 @@ When you use the **IIFE bundle** (`sigpro.js` or `sigpro.min.js`) with a traditi
|
||||
```
|
||||
|
||||
### B. ESM (Modern JavaScript) – Explicit Activation
|
||||
**ES module** (`import { ... } from 'sigpro'`) or full `import 'sigpro'`.
|
||||
**ES module** (`import { ... } from 'sigpro'`).
|
||||
|
||||
```js
|
||||
import 'sigpro';
|
||||
import { ... } from 'sigpro';
|
||||
|
||||
// Now you can use helpers globally
|
||||
const App = () => div({ class: "app" }, "Ready!");
|
||||
@@ -191,7 +191,7 @@ const Timer = () => {
|
||||
### ESM (modern projects)
|
||||
|
||||
```javascript
|
||||
import 'sigpro';
|
||||
import { $, mount } from 'sigpro';
|
||||
|
||||
const nameSignal = $('');
|
||||
|
||||
|
||||
@@ -51,11 +51,11 @@ Thanks to **SigPro's synchronous initialization**, you no longer need to wrap yo
|
||||
|
||||
```javascript
|
||||
// src/main.js
|
||||
import SigPro from 'sigpro';
|
||||
import { mount, router } from 'sigpro';
|
||||
import { routes } from 'virtual:sigpro-routes';
|
||||
|
||||
// The Core already has Router ready
|
||||
Mount(Router(routes), '#app');
|
||||
mount(router(routes), '#app');
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user