[{"data":1,"prerenderedAt":715},["ShallowReactive",2],{"docs:\u002Fauthoring\u002Fstate-and-computed":3,"docs-navigation:":173,"docs-locale-navigation":633,"i-tabler:chevron-down":709,"inrux-code-sfc:rs:fn increment(state: &mut State, _: &Context\u003CState>) {\n    state.count += 1;\n}\n":713,"inrux-code-sfc:rs:use inrux::{Computed, Signal};\n\nlet count: Signal\u003Cu32> = Signal::new(2_u32);\nlet source = count.clone();\nlet doubled: Computed\u003Cu32> = Computed::new(move || source.get() * 2);\n\nassert_eq!(doubled.get()?, 4);\ncount.update(|value| *value += 1);\nassert_eq!(doubled.get()?, 6);\n":714},{"id":4,"title":5,"body":6,"description":162,"docs":163,"extension":164,"icon":163,"meta":165,"navigation":166,"path":168,"redirect":163,"seo":169,"space":170,"stem":171,"__hash__":172},"docs\u002F3.authoring\u002F04.state-and-computed.md","State and computed values",{"type":7,"value":8,"toc":155},"minimark",[9,14,31,41,52,56,62,69,88,92,106,116,120,127,140],[10,11,13],"h2",{"id":12},"start-with-ordinary-local-state","Start with ordinary local state",[15,16,17,18,22,23,26,27,30],"p",{},"Declare retained state directly in ",[19,20,21],"code",{},"\u003Crust>",", for example ",[19,24,25],{},"let count: u32 = 0;",". The compiler generates the cloneable State and initializes it once per mount. Event handlers receive ",[19,28,29],{},"&mut State"," and a Context. Mutating a field during a handler causes Inrux to publish an updated description.",[32,33,39],"pre",{"className":34,"code":36,"language":37,"meta":38},[35],"language-rust","fn increment(state: &mut State, _: &Context\u003CState>) {\n    state.count += 1;\n}\n","rust","",[19,40,36],{"__ignoreMap":38},[15,42,43,44,47,48,51],{},"You do not need an effect to copy ",[19,45,46],{},"state.count"," into a Text node. Bind the Text expression directly to ",[19,49,50],{},"count",". Arbitrary Rust local variables do not become reactive on their own.",[10,53,55],{"id":54},"use-signal-for-shared-dependencies","Use Signal for shared dependencies",[32,57,60],{"className":58,"code":59,"language":37,"meta":38},[35],"use inrux::{Computed, Signal};\n\nlet count: Signal\u003Cu32> = Signal::new(2_u32);\nlet source = count.clone();\nlet doubled: Computed\u003Cu32> = Computed::new(move || source.get() * 2);\n\nassert_eq!(doubled.get()?, 4);\ncount.update(|value| *value += 1);\nassert_eq!(doubled.get()?, 6);\n",[19,61,59],{"__ignoreMap":38},[15,63,64,65,68],{},"This fragment belongs in a function that returns a compatible Result. ",[19,66,67],{},"Computed::get"," can fail; handle the result instead of assuming it cannot.",[15,70,71,72,74,75,78,79,81,82,87],{},"A cloned Signal shares its value. A new Signal creates independent state. Computed tracks the sources its getter reads, caches the result, and reevaluates when those sources change. Keep getters pure: no I\u002FO, mutations or background work. Put conditional labels, classes and derived layout values in the ",[19,73,21],{}," block as named computed values; the ",[19,76,77],{},"\u003Cview>"," binds to their results. Create the source Signals and Computed handles once at the top level of ",[19,80,21],{},", and clone the Signals into each getter. See the ",[83,84,86],"a",{"href":85},"\u002Fcomponents\u002Faspect-ratio","AspectRatio example"," for a complete file. For values derived directly from incoming plain props, use a pure Rust getter that reads the latest props.",[10,89,91],{"id":90},"write-composables-as-rust-functions","Write composables as Rust functions",[15,93,94,95,98,99,102,103,105],{},"Put reusable state construction in ",[19,96,97],{},"src\u002Fcomposables\u002F",". A ",[19,100,101],{},"use_counter"," function can return a struct containing a Signal and a Computed. Create those handles in the ",[19,104,21],{}," initialization block; rebuilding them while evaluating the view discards their history and dependencies.",[15,107,108,109,115],{},"Each component initialization should create independent state unless you choose to clone\u002Fshare a handle. The ",[83,110,114],{"href":111,"rel":112},"https:\u002F\u002Fgithub.com\u002Figris-labs\u002Finrux\u002Fblob\u002Fmain\u002Fplayground\u002Fegui\u002Fsrc\u002Fcomposables\u002Fuse_counter.rs",[113],"nofollow","playground composable"," shows a complete implementation.",[10,117,119],{"id":118},"know-the-boundaries","Know the boundaries",[15,121,122,123,126],{},"Computed reports cycles or concurrent evaluation through ",[19,124,125],{},"ReactiveError",". The current framework republishes descriptions rather than guaranteeing per-property native updates. A native repaint alone does not rerun application handlers or reconstruct component state.",[15,128,129,130,134,135,139],{},"For slow work, use ",[83,131,133],{"href":132},"\u002Fauthoring\u002Fbackground-tasks","background tasks",". For state shared through a subtree, use ",[83,136,138],{"href":137},"\u002Fauthoring\u002Fdependency-injection","dependency injection",".",[15,141,142,143,146,147,150,151,154],{},"In a complete view value binding, ",[19,144,145],{},"\u003CText text={doubled} \u002F>"," reads a Computed automatically. ",[19,148,149],{},"\u003CText text={counter.count} \u002F>"," also works for a Signal stored inside a composable struct. This shorthand works with both automatic setup and ",[19,152,153],{},"\u003Crust explicit>"," State fields; it does not change the normal Rust API inside handlers or getters.",{"title":38,"searchDepth":156,"depth":156,"links":157},2,[158,159,160,161],{"id":12,"depth":156,"text":13},{"id":54,"depth":156,"text":55},{"id":90,"depth":156,"text":91},{"id":118,"depth":156,"text":119},"Update local fields, share reactive handles and derive cached values.",null,"md",{},{"icon":167},"tabler:bolt","\u002Fauthoring\u002Fstate-and-computed",{"title":5,"description":162},false,"3.authoring\u002F04.state-and-computed","QdaqOYwDj_Oea5HSmyxzoX_vT-I4HYeRwX5yZseL85s",[174,229,261,328,368,586],{"title":175,"navigation":176,"description":163,"space":170,"icon":163,"docs":163,"redirect":163,"path":177,"stem":178,"children":179,"page":170},"Getting started",true,"\u002Fgetting-started","1.getting-started",[180,187,194,201,208,215,222],{"title":181,"path":182,"stem":183,"navigation":184,"description":186,"space":170,"icon":185,"docs":163,"redirect":163},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F01.introduction",{"icon":185},"tabler:book-2","Build native Rust interfaces with reusable .iru components.",{"title":188,"path":189,"stem":190,"navigation":191,"description":193,"space":170,"icon":192,"docs":163,"redirect":163},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F02.installation",{"icon":192},"tabler:download","Install the native build tools, clone Inrux and run your first application.",{"title":195,"path":196,"stem":197,"navigation":198,"description":200,"space":170,"icon":199,"docs":163,"redirect":163},"Your first application","\u002Fgetting-started\u002Ffirst-app","1.getting-started\u002F03.first-app",{"icon":199},"tabler:rocket","Create a project, mount App.iru and connect a button to local state.",{"title":202,"path":203,"stem":204,"navigation":205,"description":207,"space":170,"icon":206,"docs":163,"redirect":163},"Project structure","\u002Fgetting-started\u002Fproject-structure","1.getting-started\u002F04.project-structure",{"icon":206},"tabler:folders","Find the framework crates, native examples, editor tools and application folders.",{"title":209,"path":210,"stem":211,"navigation":212,"description":214,"space":170,"icon":213,"docs":163,"redirect":163},"Playgrounds","\u002Fgetting-started\u002Fplaygrounds","1.getting-started\u002F05.playgrounds",{"icon":213},"tabler:device-desktop","Run the same component catalogue with egui, Masonry or GPUI.",{"title":216,"path":217,"stem":218,"navigation":219,"description":221,"space":170,"icon":220,"docs":163,"redirect":163},"VS Code","\u002Fgetting-started\u002Fvscode","1.getting-started\u002F06.vscode",{"icon":220},"tabler:code","Set up .iru icons, completion, formatting, navigation and Rust support.",{"title":223,"path":224,"stem":225,"navigation":226,"description":228,"space":170,"icon":227,"docs":163,"redirect":163},"Alpha status","\u002Fgetting-started\u002Fstatus","1.getting-started\u002F07.status",{"icon":227},"tabler:flask","Check what works today and which features still need implementation or platform testing.",{"title":230,"navigation":176,"description":163,"space":170,"icon":163,"docs":163,"redirect":163,"path":231,"stem":232,"children":233,"page":170},"Architecture","\u002Finternals","2.internals",[234,240,247,254],{"title":230,"path":235,"stem":236,"navigation":237,"description":239,"space":170,"icon":238,"docs":163,"redirect":163},"\u002Finternals\u002Farchitecture","2.internals\u002F01.architecture",{"icon":238},"tabler:sitemap","Follow compilation, state ownership, threads and the native adapter boundary.",{"title":241,"path":242,"stem":243,"navigation":244,"description":246,"space":170,"icon":245,"docs":163,"redirect":163},"Adapter services","\u002Finternals\u002Fadapter-services","2.internals\u002F02.adapter-services",{"icon":245},"tabler:plug","Understand provider contracts, capabilities, fallback selection and component prerequisites.",{"title":248,"path":249,"stem":250,"navigation":251,"description":253,"space":170,"icon":252,"docs":163,"redirect":163},"Text rendering","\u002Finternals\u002Ftext-rendering","2.internals\u002F03.text-rendering",{"icon":252},"tabler:typography","Learn how shared shaping and glyph rasterization reduce differences between engines.",{"title":255,"path":256,"stem":257,"navigation":258,"description":260,"space":170,"icon":259,"docs":163,"redirect":163},"Headless components","\u002Finternals\u002Fheadless-components","2.internals\u002F04.headless-components",{"icon":259},"tabler:components","Separate interaction behavior from application appearance and themes.",{"title":262,"navigation":176,"description":163,"space":170,"icon":163,"docs":163,"redirect":163,"path":263,"stem":264,"children":265,"page":170},"Writing components","\u002Fauthoring","3.authoring",[266,273,279,286,288,295,302,309,316,322],{"title":267,"path":268,"stem":269,"navigation":270,"description":272,"space":170,"icon":271,"docs":163,"redirect":163},"The .iru format","\u002Fauthoring\u002Firu-format","3.authoring\u002F01.iru-format",{"icon":271},"tabler:file-code","Learn what goes in a component file, why Inrux uses SFCs and when to move code out.",{"title":274,"path":275,"stem":276,"navigation":277,"description":278,"space":170,"icon":259,"docs":163,"redirect":163},"Component contract","\u002Fauthoring\u002Fcomponent-contract","3.authoring\u002F02.component-contract",{"icon":259},"Write imports, props, events, models, keyed children and component state.",{"title":280,"path":281,"stem":282,"navigation":283,"description":285,"space":170,"icon":284,"docs":163,"redirect":163},"Props, events and models","\u002Fauthoring\u002Fprops-events-models","3.authoring\u002F03.props-events-models",{"icon":284},"tabler:arrows-exchange","Pass values down, send typed events up and bind controlled values.",{"title":5,"path":168,"stem":171,"navigation":287,"description":162,"space":170,"icon":167,"docs":163,"redirect":163},{"icon":167},{"title":289,"path":290,"stem":291,"navigation":292,"description":294,"space":170,"icon":293,"docs":163,"redirect":163},"Conditions, lists and dynamic components","\u002Fauthoring\u002Fcontrol-flow","3.authoring\u002F05.control-flow",{"icon":293},"tabler:git-branch","Render branches, preserve list identity and select imported components.",{"title":296,"path":297,"stem":298,"navigation":299,"description":301,"space":170,"icon":300,"docs":163,"redirect":163},"Children and layouts","\u002Fauthoring\u002Fchildren-and-layouts","3.authoring\u002F06.children-and-layouts",{"icon":300},"tabler:layout","Pass default child content through reusable application shells.",{"title":303,"path":304,"stem":305,"navigation":306,"description":308,"space":170,"icon":307,"docs":163,"redirect":163},"Separating business logic","\u002Fauthoring\u002Fbusiness-logic","3.authoring\u002F07.business-logic",{"icon":307},"tabler:briefcase","Keep component interactions nearby and domain behavior reusable in Rust modules.",{"title":310,"path":311,"stem":312,"navigation":313,"description":315,"space":170,"icon":314,"docs":163,"redirect":163},"Lifecycle and refs","\u002Fauthoring\u002Flifecycle-and-refs","3.authoring\u002F08.lifecycle-and-refs",{"icon":314},"tabler:refresh","Understand setup, mount identity, cleanup and the limits of native refs.",{"title":317,"path":132,"stem":318,"navigation":319,"description":321,"space":170,"icon":320,"docs":163,"redirect":163},"Background tasks","3.authoring\u002F09.background-tasks",{"icon":320},"tabler:cpu","Run slow work outside the coordinator and return typed results to component state.",{"title":323,"path":137,"stem":324,"navigation":325,"description":327,"space":170,"icon":326,"docs":163,"redirect":163},"Provide and inject","3.authoring\u002F10.dependency-injection",{"icon":326},"tabler:plug-connected","Share typed services through a component subtree without prop drilling.",{"title":329,"navigation":176,"description":163,"space":170,"icon":163,"docs":163,"redirect":163,"path":330,"stem":331,"children":332,"page":170},"Styling","\u002Fstyling","4.styling",[333,340,347,354,361],{"title":334,"path":335,"stem":336,"navigation":337,"description":339,"space":170,"icon":338,"docs":163,"redirect":163},"Styling basics","\u002Fstyling\u002Foverview","4.styling\u002F01.overview",{"icon":338},"tabler:palette","Style headless components with CSS-like rules or Rust values.",{"title":341,"path":342,"stem":343,"navigation":344,"description":346,"space":170,"icon":345,"docs":163,"redirect":163},"CSS reference","\u002Fstyling\u002Fcss-reference","4.styling\u002F02.css-reference",{"icon":345},"tabler:file-type-css","Use the supported selectors, properties, cascade and compiled style rules.",{"title":348,"path":349,"stem":350,"navigation":351,"description":353,"space":170,"icon":352,"docs":163,"redirect":163},"Parts and states","\u002Fstyling\u002Fparts-and-states","4.styling\u002F03.parts-and-states",{"icon":352},"tabler:puzzle","Style exposed control parts and interaction states without native widget handles.",{"title":355,"path":356,"stem":357,"navigation":358,"description":360,"space":170,"icon":359,"docs":163,"redirect":163},"Color values","\u002Fstyling\u002Fcolors","4.styling\u002F04.colors",{"icon":359},"tabler:color-swatch","Write literal CSS colors and understand alpha and color-space limits.",{"title":362,"path":363,"stem":364,"navigation":365,"description":367,"space":170,"icon":366,"docs":163,"redirect":163},"Themes and responsiveness","\u002Fstyling\u002Fthemes-and-responsiveness","4.styling\u002F05.themes-and-responsiveness",{"icon":366},"tabler:sun-moon","Compile complete theme sheets and respond to logical viewport dimensions.",{"title":369,"navigation":176,"description":163,"space":170,"icon":163,"docs":163,"redirect":163,"path":370,"stem":371,"children":372,"page":170},"Components","\u002Fcomponents","5.components",[373,379,386,393,400,407,414,421,428,435,442,449,456,463,470,477,484,491,498,504,511,518,525,532,538,545,552,559,566,572,579],{"title":374,"path":85,"stem":375,"navigation":376,"description":378,"space":170,"icon":377,"docs":163,"redirect":163},"AspectRatio","5.components\u002Faspect-ratio",{"icon":377},"tabler:aspect-ratio","Size a container around a positive width-to-height ratio.",{"title":380,"path":381,"stem":382,"navigation":383,"description":385,"space":170,"icon":384,"docs":163,"redirect":163},"Badge","\u002Fcomponents\u002Fbadge","5.components\u002Fbadge",{"icon":384},"tabler:badge","Display a short status label.",{"title":387,"path":388,"stem":389,"navigation":390,"description":392,"space":170,"icon":391,"docs":163,"redirect":163},"Box","\u002Fcomponents\u002Fbox","5.components\u002Fbox",{"icon":391},"tabler:box","Create a physical vertical container.",{"title":394,"path":395,"stem":396,"navigation":397,"description":399,"space":170,"icon":398,"docs":163,"redirect":163},"Button","\u002Fcomponents\u002Fbutton","5.components\u002Fbutton",{"icon":398},"tabler:hand-click","Trigger an action from a labeled control.",{"title":401,"path":402,"stem":403,"navigation":404,"description":406,"space":170,"icon":405,"docs":163,"redirect":163},"Card","\u002Fcomponents\u002Fcard","5.components\u002Fcard",{"icon":405},"tabler:id","Group related child content in a surface.",{"title":408,"path":409,"stem":410,"navigation":411,"description":413,"space":170,"icon":412,"docs":163,"redirect":163},"Center","\u002Fcomponents\u002Fcenter","5.components\u002Fcenter",{"icon":412},"tabler:align-box-center-middle","Center a group within available free space.",{"title":415,"path":416,"stem":417,"navigation":418,"description":420,"space":170,"icon":419,"docs":163,"redirect":163},"Checkbox","\u002Fcomponents\u002Fcheckbox","5.components\u002Fcheckbox",{"icon":419},"tabler:checkbox","Control a labeled boolean choice.",{"title":422,"path":423,"stem":424,"navigation":425,"description":427,"space":170,"icon":426,"docs":163,"redirect":163},"Column","\u002Fcomponents\u002Fcolumn","5.components\u002Fcolumn",{"icon":426},"tabler:layout-list","Arrange child nodes vertically.",{"title":429,"path":430,"stem":431,"navigation":432,"description":434,"space":170,"icon":433,"docs":163,"redirect":163},"Container","\u002Fcomponents\u002Fcontainer","5.components\u002Fcontainer",{"icon":433},"tabler:container","Constrain and center a reading or application column.",{"title":436,"path":437,"stem":438,"navigation":439,"description":441,"space":170,"icon":440,"docs":163,"redirect":163},"Content reference","\u002Fcomponents\u002Fcontent-reference","5.components\u002Fcontent-reference",{"icon":440},"tabler:file-description","Compose cards, badges and separators with shared component descriptions.",{"title":443,"path":444,"stem":445,"navigation":446,"description":448,"space":170,"icon":447,"docs":163,"redirect":163},"Dialog","\u002Fcomponents\u002Fdialog","5.components\u002Fdialog",{"icon":447},"tabler:message","Show an egui-only modal prototype.",{"title":450,"path":451,"stem":452,"navigation":453,"description":455,"space":170,"icon":454,"docs":163,"redirect":163},"Flex","\u002Fcomponents\u002Fflex","5.components\u002Fflex",{"icon":454},"tabler:layout-distribute-horizontal","Choose a flexible layout direction and wrapping policy.",{"title":457,"path":458,"stem":459,"navigation":460,"description":462,"space":170,"icon":461,"docs":163,"redirect":163},"Grid","\u002Fcomponents\u002Fgrid","5.components\u002Fgrid",{"icon":461},"tabler:layout-grid","Arrange direct children in equal-width columns.",{"title":464,"path":465,"stem":466,"navigation":467,"description":469,"space":170,"icon":468,"docs":163,"redirect":163},"Heartbeat","\u002Fcomponents\u002Fheartbeat","5.components\u002Fheartbeat",{"icon":468},"tabler:heartbeat","Inspect an egui-only UI-thread animation diagnostic.",{"title":471,"path":472,"stem":473,"navigation":474,"description":476,"space":170,"icon":475,"docs":163,"redirect":163},"Input","\u002Fcomponents\u002Finput","5.components\u002Finput",{"icon":475},"tabler:forms","Edit a controlled single-line string.",{"title":478,"path":479,"stem":480,"navigation":481,"description":483,"space":170,"icon":482,"docs":163,"redirect":163},"Layout reference","\u002Fcomponents\u002Flayout-reference","5.components\u002Flayout-reference",{"icon":482},"tabler:layout-dashboard","Understand sizing, centering, spacing, flex, grid and aspect-ratio behavior.",{"title":485,"path":486,"stem":487,"navigation":488,"description":490,"space":170,"icon":489,"docs":163,"redirect":163},"Markdown","\u002Fcomponents\u002Fmarkdown","5.components\u002Fmarkdown",{"icon":489},"tabler:markdown","Render a subset of CommonMark through existing native components.",{"title":492,"path":493,"stem":494,"navigation":495,"description":497,"space":170,"icon":496,"docs":163,"redirect":163},"Meter","\u002Fcomponents\u002Fmeter","5.components\u002Fmeter",{"icon":496},"tabler:gauge","Show a finite measurement within explicit bounds.",{"title":499,"path":500,"stem":501,"navigation":502,"description":503,"space":170,"icon":259,"docs":163,"redirect":163},"Component catalogue","\u002Fcomponents\u002Foverview","5.components\u002Foverview",{"icon":259},"Choose a portable control or layout primitive and check its current API.",{"title":505,"path":506,"stem":507,"navigation":508,"description":510,"space":170,"icon":509,"docs":163,"redirect":163},"Progress","\u002Fcomponents\u002Fprogress","5.components\u002Fprogress",{"icon":509},"tabler:progress","Show a finite amount of completed work.",{"title":512,"path":513,"stem":514,"navigation":515,"description":517,"space":170,"icon":516,"docs":163,"redirect":163},"Boolean and range reference","\u002Fcomponents\u002Frange-reference","5.components\u002Frange-reference",{"icon":516},"tabler:adjustments-horizontal","Use controlled switches and validated progress and measurement ranges.",{"title":519,"path":520,"stem":521,"navigation":522,"description":524,"space":170,"icon":523,"docs":163,"redirect":163},"Row","\u002Fcomponents\u002Frow","5.components\u002Frow",{"icon":523},"tabler:columns","Arrange child nodes horizontally.",{"title":526,"path":527,"stem":528,"navigation":529,"description":531,"space":170,"icon":530,"docs":163,"redirect":163},"ScrollArea","\u002Fcomponents\u002Fscroll-area","5.components\u002Fscroll-area",{"icon":530},"tabler:arrows-vertical","Clip and scroll bounded child content.",{"title":533,"path":534,"stem":535,"navigation":536,"description":537,"space":170,"icon":530,"docs":163,"redirect":163},"Scrolling reference","\u002Fcomponents\u002Fscrolling-reference","5.components\u002Fscrolling-reference",{"icon":530},"Use viewport commands, observations, clipping and native input direction.",{"title":539,"path":540,"stem":541,"navigation":542,"description":544,"space":170,"icon":543,"docs":163,"redirect":163},"Select","\u002Fcomponents\u002Fselect","5.components\u002Fselect",{"icon":543},"tabler:selector","Choose a controlled string value from options.",{"title":546,"path":547,"stem":548,"navigation":549,"description":551,"space":170,"icon":550,"docs":163,"redirect":163},"Separator","\u002Fcomponents\u002Fseparator","5.components\u002Fseparator",{"icon":550},"tabler:separator","Draw a decorative divider.",{"title":553,"path":554,"stem":555,"navigation":556,"description":558,"space":170,"icon":557,"docs":163,"redirect":163},"Spacer","\u002Fcomponents\u002Fspacer","5.components\u002Fspacer",{"icon":557},"tabler:space","Consume free main-axis space in a Row or Column.",{"title":560,"path":561,"stem":562,"navigation":563,"description":565,"space":170,"icon":564,"docs":163,"redirect":163},"Switch","\u002Fcomponents\u002Fswitch","5.components\u002Fswitch",{"icon":564},"tabler:toggle-left","Turn a labeled setting on or off.",{"title":567,"path":568,"stem":569,"navigation":570,"description":571,"space":170,"icon":252,"docs":163,"redirect":163},"Text","\u002Fcomponents\u002Ftext","5.components\u002Ftext",{"icon":252},"Display text with shared shaping and glyph pixels.",{"title":573,"path":574,"stem":575,"navigation":576,"description":578,"space":170,"icon":577,"docs":163,"redirect":163},"TextArea","\u002Fcomponents\u002Ftext-area","5.components\u002Ftext-area",{"icon":577},"tabler:align-left","Edit multiline text with wrapping and caret scrolling.",{"title":580,"path":581,"stem":582,"navigation":583,"description":585,"space":170,"icon":584,"docs":163,"redirect":163},"Text editing reference","\u002Fcomponents\u002Ftext-editing-reference","5.components\u002Ftext-editing-reference",{"icon":584},"tabler:text-wrap","Choose single-line Input or multiline TextArea and bind controlled text.",{"title":587,"navigation":176,"description":163,"space":170,"icon":163,"docs":163,"redirect":163,"path":588,"stem":589,"children":590,"page":170},"Tooling and contribution","\u002Ftooling","6.tooling",[591,598,605,612,619,626],{"title":592,"path":593,"stem":594,"navigation":595,"description":597,"space":170,"icon":596,"docs":163,"redirect":163},"CLI","\u002Ftooling\u002Fcli","6.tooling\u002F01.cli",{"icon":596},"tabler:terminal-2","Scaffold, validate and run applications through Cargo.",{"title":599,"path":600,"stem":601,"navigation":602,"description":604,"space":170,"icon":603,"docs":163,"redirect":163},"Contributing","\u002Ftooling\u002Fcontributing","6.tooling\u002F02.contributing",{"icon":603},"tabler:git-pull-request","Keep modules focused, preserve backend boundaries and run the relevant checks.",{"title":606,"path":607,"stem":608,"navigation":609,"description":611,"space":170,"icon":610,"docs":163,"redirect":163},"Working on this website","\u002Ftooling\u002Fdocumentation","6.tooling\u002F03.documentation",{"icon":610},"tabler:notebook","Run, edit, validate and export the Nuxt documentation site.",{"title":613,"path":614,"stem":615,"navigation":616,"description":618,"space":170,"icon":617,"docs":163,"redirect":163},"Troubleshooting","\u002Ftooling\u002Ftroubleshooting","6.tooling\u002F04.troubleshooting",{"icon":617},"tabler:bug","Resolve common compiler, native build and editor setup problems.",{"title":620,"path":621,"stem":622,"navigation":623,"description":625,"space":170,"icon":624,"docs":163,"redirect":163},"Rust API reference","\u002Ftooling\u002Frust-api","6.tooling\u002F05.rust-api",{"icon":624},"tabler:api","Find the public Rust types, build local rustdoc and inspect individual package APIs.",{"title":627,"path":628,"stem":629,"navigation":630,"description":632,"space":170,"icon":631,"docs":163,"redirect":163},"License and notices","\u002Ftooling\u002Flicense","6.tooling\u002F06.license",{"icon":631},"tabler:scale","Understand the license for Inrux code and the notices retained for dependencies and fonts.",[634,643,649,661,668,701],{"title":175,"space":170,"redirect":163,"path":177,"stem":178,"children":635,"page":170},[636,637,638,639,640,641,642],{"title":181,"path":182,"stem":183,"space":170,"redirect":163,"icon":185},{"title":188,"path":189,"stem":190,"space":170,"redirect":163,"icon":192},{"title":195,"path":196,"stem":197,"space":170,"redirect":163,"icon":199},{"title":202,"path":203,"stem":204,"space":170,"redirect":163,"icon":206},{"title":209,"path":210,"stem":211,"space":170,"redirect":163,"icon":213},{"title":216,"path":217,"stem":218,"space":170,"redirect":163,"icon":220},{"title":223,"path":224,"stem":225,"space":170,"redirect":163,"icon":227},{"title":230,"space":170,"redirect":163,"path":231,"stem":232,"children":644,"page":170},[645,646,647,648],{"title":230,"path":235,"stem":236,"space":170,"redirect":163,"icon":238},{"title":241,"path":242,"stem":243,"space":170,"redirect":163,"icon":245},{"title":248,"path":249,"stem":250,"space":170,"redirect":163,"icon":252},{"title":255,"path":256,"stem":257,"space":170,"redirect":163,"icon":259},{"title":262,"space":170,"redirect":163,"path":263,"stem":264,"children":650,"page":170},[651,652,653,654,655,656,657,658,659,660],{"title":267,"path":268,"stem":269,"space":170,"redirect":163,"icon":271},{"title":274,"path":275,"stem":276,"space":170,"redirect":163,"icon":259},{"title":280,"path":281,"stem":282,"space":170,"redirect":163,"icon":284},{"title":5,"path":168,"stem":171,"space":170,"redirect":163,"icon":167},{"title":289,"path":290,"stem":291,"space":170,"redirect":163,"icon":293},{"title":296,"path":297,"stem":298,"space":170,"redirect":163,"icon":300},{"title":303,"path":304,"stem":305,"space":170,"redirect":163,"icon":307},{"title":310,"path":311,"stem":312,"space":170,"redirect":163,"icon":314},{"title":317,"path":132,"stem":318,"space":170,"redirect":163,"icon":320},{"title":323,"path":137,"stem":324,"space":170,"redirect":163,"icon":326},{"title":329,"space":170,"redirect":163,"path":330,"stem":331,"children":662,"page":170},[663,664,665,666,667],{"title":334,"path":335,"stem":336,"space":170,"redirect":163,"icon":338},{"title":341,"path":342,"stem":343,"space":170,"redirect":163,"icon":345},{"title":348,"path":349,"stem":350,"space":170,"redirect":163,"icon":352},{"title":355,"path":356,"stem":357,"space":170,"redirect":163,"icon":359},{"title":362,"path":363,"stem":364,"space":170,"redirect":163,"icon":366},{"title":369,"space":170,"redirect":163,"path":370,"stem":371,"children":669,"page":170},[670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700],{"title":374,"path":85,"stem":375,"space":170,"redirect":163,"icon":377},{"title":380,"path":381,"stem":382,"space":170,"redirect":163,"icon":384},{"title":387,"path":388,"stem":389,"space":170,"redirect":163,"icon":391},{"title":394,"path":395,"stem":396,"space":170,"redirect":163,"icon":398},{"title":401,"path":402,"stem":403,"space":170,"redirect":163,"icon":405},{"title":408,"path":409,"stem":410,"space":170,"redirect":163,"icon":412},{"title":415,"path":416,"stem":417,"space":170,"redirect":163,"icon":419},{"title":422,"path":423,"stem":424,"space":170,"redirect":163,"icon":426},{"title":429,"path":430,"stem":431,"space":170,"redirect":163,"icon":433},{"title":436,"path":437,"stem":438,"space":170,"redirect":163,"icon":440},{"title":443,"path":444,"stem":445,"space":170,"redirect":163,"icon":447},{"title":450,"path":451,"stem":452,"space":170,"redirect":163,"icon":454},{"title":457,"path":458,"stem":459,"space":170,"redirect":163,"icon":461},{"title":464,"path":465,"stem":466,"space":170,"redirect":163,"icon":468},{"title":471,"path":472,"stem":473,"space":170,"redirect":163,"icon":475},{"title":478,"path":479,"stem":480,"space":170,"redirect":163,"icon":482},{"title":485,"path":486,"stem":487,"space":170,"redirect":163,"icon":489},{"title":492,"path":493,"stem":494,"space":170,"redirect":163,"icon":496},{"title":499,"path":500,"stem":501,"space":170,"redirect":163,"icon":259},{"title":505,"path":506,"stem":507,"space":170,"redirect":163,"icon":509},{"title":512,"path":513,"stem":514,"space":170,"redirect":163,"icon":516},{"title":519,"path":520,"stem":521,"space":170,"redirect":163,"icon":523},{"title":526,"path":527,"stem":528,"space":170,"redirect":163,"icon":530},{"title":533,"path":534,"stem":535,"space":170,"redirect":163,"icon":530},{"title":539,"path":540,"stem":541,"space":170,"redirect":163,"icon":543},{"title":546,"path":547,"stem":548,"space":170,"redirect":163,"icon":550},{"title":553,"path":554,"stem":555,"space":170,"redirect":163,"icon":557},{"title":560,"path":561,"stem":562,"space":170,"redirect":163,"icon":564},{"title":567,"path":568,"stem":569,"space":170,"redirect":163,"icon":252},{"title":573,"path":574,"stem":575,"space":170,"redirect":163,"icon":577},{"title":580,"path":581,"stem":582,"space":170,"redirect":163,"icon":584},{"title":587,"space":170,"redirect":163,"path":588,"stem":589,"children":702,"page":170},[703,704,705,706,707,708],{"title":592,"path":593,"stem":594,"space":170,"redirect":163,"icon":596},{"title":599,"path":600,"stem":601,"space":170,"redirect":163,"icon":603},{"title":606,"path":607,"stem":608,"space":170,"redirect":163,"icon":610},{"title":613,"path":614,"stem":615,"space":170,"redirect":163,"icon":617},{"title":620,"path":621,"stem":622,"space":170,"redirect":163,"icon":624},{"title":627,"path":628,"stem":629,"space":170,"redirect":163,"icon":631},{"left":710,"top":710,"width":711,"height":711,"rotate":710,"vFlip":170,"hFlip":170,"body":712},0,24,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"\u002F>","\u003Cspan class=\"shj-syn-kwd\">fn\u003C\u002Fspan> \u003Cspan class=\"shj-syn-func\">increment\u003C\u002Fspan>(state\u003Cspan class=\"shj-syn-oper\">:\u003C\u002Fspan> \u003Cspan class=\"shj-syn-oper\">&#38;\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\">mut\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">State\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">,\u003C\u002Fspan> _\u003Cspan class=\"shj-syn-oper\">:\u003C\u002Fspan> \u003Cspan class=\"shj-syn-oper\">&#38;\u003C\u002Fspan>\u003Cspan class=\"shj-syn-class\">Context\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&lt;\u003C\u002Fspan>\u003Cspan class=\"shj-syn-class\">State\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&gt;\u003C\u002Fspan>) {\n    state\u003Cspan class=\"shj-syn-oper\">.\u003C\u002Fspan>count \u003Cspan class=\"shj-syn-oper\">+=\u003C\u002Fspan> \u003Cspan class=\"shj-syn-num\">1\u003C\u002Fspan>;\n}\n","\u003Cspan class=\"shj-syn-kwd\">use\u003C\u002Fspan> inrux\u003Cspan class=\"shj-syn-oper\">::\u003C\u002Fspan>{\u003Cspan class=\"shj-syn-class\">Computed\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">,\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">Signal\u003C\u002Fspan>};\n\n\u003Cspan class=\"shj-syn-kwd\">let\u003C\u002Fspan> count\u003Cspan class=\"shj-syn-oper\">:\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">Signal\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&lt;\u003C\u002Fspan>u32\u003Cspan class=\"shj-syn-oper\">&gt;\u003C\u002Fspan> \u003Cspan class=\"shj-syn-oper\">=\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">Signal\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">::\u003C\u002Fspan>\u003Cspan class=\"shj-syn-func\">new\u003C\u002Fspan>(2_u32);\n\u003Cspan class=\"shj-syn-kwd\">let\u003C\u002Fspan> source \u003Cspan class=\"shj-syn-oper\">=\u003C\u002Fspan> count\u003Cspan class=\"shj-syn-oper\">.\u003C\u002Fspan>\u003Cspan class=\"shj-syn-func\">clone\u003C\u002Fspan>();\n\u003Cspan class=\"shj-syn-kwd\">let\u003C\u002Fspan> doubled\u003Cspan class=\"shj-syn-oper\">:\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">Computed\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&lt;\u003C\u002Fspan>u32\u003Cspan class=\"shj-syn-oper\">&gt;\u003C\u002Fspan> \u003Cspan class=\"shj-syn-oper\">=\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">Computed\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">::\u003C\u002Fspan>\u003Cspan class=\"shj-syn-func\">new\u003C\u002Fspan>(\u003Cspan class=\"shj-syn-kwd\">move\u003C\u002Fspan> \u003Cspan class=\"shj-syn-oper\">||\u003C\u002Fspan> source\u003Cspan class=\"shj-syn-oper\">.\u003C\u002Fspan>\u003Cspan class=\"shj-syn-func\">get\u003C\u002Fspan>() \u003Cspan class=\"shj-syn-oper\">*\u003C\u002Fspan> \u003Cspan class=\"shj-syn-num\">2\u003C\u002Fspan>);\n\n\u003Cspan class=\"shj-syn-func\">assert_eq\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">!\u003C\u002Fspan>(doubled\u003Cspan class=\"shj-syn-oper\">.\u003C\u002Fspan>\u003Cspan class=\"shj-syn-func\">get\u003C\u002Fspan>()\u003Cspan class=\"shj-syn-oper\">?,\u003C\u002Fspan> \u003Cspan class=\"shj-syn-num\">4\u003C\u002Fspan>);\ncount\u003Cspan class=\"shj-syn-oper\">.\u003C\u002Fspan>\u003Cspan class=\"shj-syn-func\">update\u003C\u002Fspan>(\u003Cspan class=\"shj-syn-oper\">|\u003C\u002Fspan>value\u003Cspan class=\"shj-syn-oper\">|\u003C\u002Fspan> \u003Cspan class=\"shj-syn-oper\">*\u003C\u002Fspan>value \u003Cspan class=\"shj-syn-oper\">+=\u003C\u002Fspan> \u003Cspan class=\"shj-syn-num\">1\u003C\u002Fspan>);\n\u003Cspan class=\"shj-syn-func\">assert_eq\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">!\u003C\u002Fspan>(doubled\u003Cspan class=\"shj-syn-oper\">.\u003C\u002Fspan>\u003Cspan class=\"shj-syn-func\">get\u003C\u002Fspan>()\u003Cspan class=\"shj-syn-oper\">?,\u003C\u002Fspan> \u003Cspan class=\"shj-syn-num\">6\u003C\u002Fspan>);\n",1794980346094]