Loading tutorials
cacheable=true flag, the reactive parameter, and the shape of the object the wire gives you.6 min read@AuraEnabled method with a SOQL query, and that you are comfortable with promises and async/await. The chapter explains what the client-side cache does and7 min read@wire, read an @AuraEnabled(cacheable=true) Apex method, and use promises and async/await. Before you can refresh wired data with refreshApex, you need to know exactly what the wire hands your component. This chapter covers that object, h6 min readdata and error from the result, and use async/await. The earlier chapters covered why cached data goes stale and what a wire provisions. This chapter covers the function that fixes staleness: refreshApex.5 min readrefreshApex: a wire whose result is stored in a class property. It assumes you can already wire a cacheable Apex method, know that wired data comes from a client-side cache, and know what the result object (data and error) looks like. It also assumes5 min read@AuraEnabled method, and use async/await. It also assumes you know that refreshApex exists and why cached wire data can go stale. Here you will learn how to refresh a wire that is bound to a function, where yo5 min read@AuraEnabled Apex method, wire it to a Lightning web component, and use async/await. You should also know that a wired method marked cacheable=true returns data from a client-side cache. The chapter explains why a method that changes data must not b6 min readrefreshApex, which re-fetches wired data. It assumes you can wire a cacheable Apex method, write an @AuraEnabled method with SOQL, and use async/await. It also assumes you know that `re5 min readasync/await, and use refreshApex after a save. It covers what happens when either step fails, and how to tell the user which one did.5 min readrefreshApex after a non-cacheable DML method. It also assumes you are comfortable with async/await. Here you will see what changes when the wire has reactive parameters, meaning parameter6 min read@wire, you know @AuraEnabled(cacheable=true) Apex methods, and you are comfortable with async/await. It also assumes you have seen refreshApex used once.5 min readrefreshApex takes that object, and why updates go through a non-cacheable Apex method. Here you will learn where refreshApex stops fitting and what to use instead.5 min readcreateElement. It also assumes you know the ContactList component from earlier in the tutorial, which wires getContacts to a function, saves with updateEmail, and then calls refreshApex on the stored wire result.5 min read