vUXDocs v4.1.0

vUX and React

React and vUX both keep a page in step with its data, but React re-renders and compiles while vUX writes changed bindings straight to the page. Many React features exist only to manage that re-rendering, so vUX has no use for them.

The table maps each React feature to its vUX equivalent. Status reads:

  • Yes: vUX has it.
  • Partial: vUX covers part of it, with more manual steps.
  • Gap: vUX lacks it.
  • Not required: the feature solves a problem vUX does not have, because vUX does not re-render or compile.
FeatureReactvUXStatus
ComponentsFunction componentsComponent from your own HTML <template>Yes
TemplatesJSX (needs a build step)Real HTML with data-v-* attributesNot required: templates are plain HTML and there is no build step
Virtual DOMRe-renders a tree in memory, then compares it with the last oneNo tree. Each binding's old and new value are compared and only changed nodes are writtenNot required: bindings are tracked directly, so there is nothing to compare
Showing data{value} in JSXdata-v-field, data-v-bind (attributes)Yes
Conditionalscond && <X/>, ternariesdata-v-show, data-v-class (based on a true/false field, ! negates it)Partial: shows or hides, but cannot add or remove elements. Branching logic goes in formatters or onUpdate
Lists and keys.map() + keycomponent.sync() + config.key, DataViewYes
EventsonClick={fn} (React's own event objects)data-v-on="click:handler" (native events)Yes
Props (data from a parent)Passed down; the child re-renders when they changemount(container, data), then instance.update()Partial: data is given once. A parent change does not update the child automatically; use update() or a Store binding
Children / slotschildren, nestinginstance.mount(child, ...) into a data-v-ref node, owned by the parentPartial: nesting yes, but no slot syntax
Local state (useState)A setter triggers a re-renderinstance.update(fields)Yes: an explicit call does the job of the setter
useReducerActions plus a reducer functionstore.set(s => ...), or one helper function that does all the writesNot required: the updater form of set() covers it
Shared state (Context, Redux, Zustand)Context, or a separate libraryStore with subscribe(), bind(), bindList()Yes (v4.1.0)
Computed values (useMemo)Remembered between rendersconfig.computed (Store), config.formatters (Component)Yes
useCallback, React.memoStop child components re-rendering needlesslyNothing re-renders, so there is nothing to stopNot required
Side effects (useEffect)Runs after render, with dependencies and cleanuponMount, onUpdate(changed), onDestroy, store.subscribe(fn, fields)Yes: the fields list does the job of the dependency array
Refs (useRef)Reach a DOM nodedata-v-ref + instance.ref(name)Yes
Custom hooksReusable stateful logicPlain functions + StoreNot required: there are no render rules, so any function can hold logic
Two-way form bindingControlled inputs (value + onChange)A handler calls update() / set() by handPartial: a few manual lines. FormComponents and FormValidator cover widgets and validation
Fragments<>...</> to return several root elementsOne root element per templateNot required: wrap the content in an element
PortalsRender outside the parent's DOMmount() takes any container. ModalDisplayer and Prompt render to the body or the top layerNot required
Error boundariesShow a fallback when a child component throwsNone. Errors throw at the call, and a Store rethrows the first subscriber errorGap: one broken part cannot be fenced off with a fallback
Lazy loading (React.lazy)Load components when neededNative import(); vUX modules already load each other this wayNot required
Suspense / loading screensFallback while data or code loadsSkeleton, ProgressIndicator, FontSplashPartial: covers loading screens, but not as a general "wait for this" wrapper
Concurrent rendering, transitionsSplits up and prioritises rendersUpdates are small and synchronousNot required: there are no long renders to split up
Server rendering, hydrationNext.js, server componentsRuns in the browser onlyNot required for vUX's purpose: SEO pages can serve static HTML that vUX enhances
RoutingSeparate library (React Router)SPAEngine: routes, route parameters, caching, scroll restoreYes: built in
Lifecycle teardownUnmount + effect cleanupdestroy() on every module; nested children are destroyed with their parentYes
Ready-made widgetsNone (third-party libraries)Modal, Prompt, MessageBox, Carousel, ToolTip, Marquee, SketchPad, Resizer and moreYes: vUX has more here
Form validationThird-party librariesFormValidatorYes
StylingNot built in (CSS Modules, styled-components and others)Your own stylesheet; modules link their own CSSYes
Dev toolsReact DevTools (component tree, state)vUxModules in the console onlyGap: no inspector for components or stores
TypeScript typesOfficial typesNoneGap: no .d.ts files, so no editor autocomplete or type checking
Testing toolsReact Testing Library, JestNone (no test runner by design)Gap: tests are run in a browser by hand
Build toolingNeeded (JSX, bundling)None; ./minify.sh is optionalNot required: vUX runs unbuilt

In short: 11 features are not required, because React needs them only for re-rendering and compiling. Five are partial: conditionals, props, children/slots, two-way form binding and Suspense. Four are gaps: error boundaries, dev tools, TypeScript types and testing tools. None of the gaps blocks building an app.