Reactive state
Set values through reQuery state and let bound DOM nodes update from that source.
01 · Why it exists
In many older or CMS-driven projects, the cost of moving to a full SPA framework is not justified. But manual DOM synchronization still becomes brittle when the UI depends on several values.
reQuery gives that code a small reactive layer while keeping the jQuery mental model. State is the source of truth, and DOM bindings update when state changes.
Binding model
Set values through reQuery state and let bound DOM nodes update from that source.
data-rq-* bindingsBind text, HTML, attributes, classes, values, and visibility from markup.
The API keeps familiar chaining patterns instead of introducing a new component runtime.
$.reQuery.use(fn) lets advanced behavior hook into the update pipeline.
02 · Bindings
| Binding | Behavior |
|---|---|
data-rq-text |
Writes state into text content. |
data-rq-html |
Writes state into HTML content when that is intentional. |
data-rq-show |
Toggles display based on truthiness. |
data-rq-class |
Adds or removes a class from state. |
data-rq-value |
Keeps form values connected to state. |
03 · Fit
reQuery is useful for WordPress themes, CMS templates, embedded widgets, admin screens, and jQuery-heavy codebases where a full framework migration is not the work at hand.
It is not meant for greenfield SPA development. Vue, React, or Svelte are better choices when a component app is the goal from the start.
Keep exploring