dump
dump<
T>(data):T
Defined in: aberdeen.ts:3578
Renders a live, recursive dump of a proxied data structure (or any value) into the DOM at the current A insertion point.
Uses <ul> and <li> elements to display object properties and array items.
Updates reactively if the dumped data changes. Primarily intended for debugging purposes.
Type Parameters
Section titled “Type Parameters”T
The type of the data being dumped.
Parameters
Section titled “Parameters”T
The proxied data structure (or any value) to display.
Returns
Section titled “Returns”T
The original data argument, allowing for chaining.
Example
Section titled “Example”Dumping reactive state
import A from 'aberdeen';
const $state = A.proxy({ user: { name: 'Frank', kids: 1 }, items: ['a', 'b']});
A('h2#Live State Dump');A.dump($state);
// Change state later, the dump in the DOM will updatesetTimeout(() => { $state.user.kids++; $state.items.push('c'); }, 2000);