You need to sign in to do that
Don't have an account?

Force refreshView in LWC
In Aura, we can do
How can we do an equivalent in LWC because sfdx refuses to publish .js code with $A in it saying the usage is disallowed in LWC?
For now i tricked it with
$A.get('e.force:refreshView').fire();to cause standard components to update.
How can we do an equivalent in LWC because sfdx refuses to publish .js code with $A in it saying the usage is disallowed in LWC?
For now i tricked it with
eval("$A.get('e.force:refreshView').fire();");but that is obviously less than ideal....
you can use window.realod() ...
is like using a microscope as a hammer.
The force:refreshView is actually implemented by components individually and doesn't cause the full window reload.
Please follow the below link,
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.apex
Thanks!
Kindly mark this as best answer so that it will also help others to find the solution
https://rkreddy-sfdx.blogspot.com/2019/12/how-to-refresh-lightning-web-component.html
If it is useful for you, then please select as best answer.
thanks
Ramakrishna Reddy