Dynamic Updates
Update widgets dynamically without remounting.
Address Switching
Update the widget when the user changes address:
const widget = createWidget({
apiKey: 'your_api_key',
address: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
type: 'reputation'
});
widget.mount('#container');
// Update to a new address
function switchAddress(newAddress: string) {
widget.update({ address: newAddress });
}
// Usage
document.getElementById('address-input').addEventListener('change', (e) => {
switchAddress(e.target.value);
});Theme Toggling
Switch between light and dark themes:
React Dynamic Updates
Vue Dynamic Updates
Wallet Connection Flow
Update widget when user connects wallet:
Refresh Data
Force a data refresh without updating config:
Debounced Updates
Avoid excessive updates with debouncing:
Category Selector
Switch between different category views:
Multiple Synchronized Updates
Update multiple widgets at once:
Responsive Updates
Update widget options based on screen size:
Related
Last updated
