{"id":21640808,"url":"https://github.com/mitchspano/lwcrefreshdemo","last_synced_at":"2025-04-11T17:15:34.198Z","repository":{"id":113764939,"uuid":"224040182","full_name":"mitchspano/LWCRefreshDemo","owner":"mitchspano","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-21T05:02:16.000Z","size":1947,"stargazers_count":5,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T13:11:20.320Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitchspano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-25T20:58:06.000Z","updated_at":"2021-12-01T02:40:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"39029c00-fb29-4e0b-a856-163545b727a5","html_url":"https://github.com/mitchspano/LWCRefreshDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchspano%2FLWCRefreshDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchspano%2FLWCRefreshDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchspano%2FLWCRefreshDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchspano%2FLWCRefreshDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchspano","download_url":"https://codeload.github.com/mitchspano/LWCRefreshDemo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447595,"owners_count":21105140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T04:23:53.257Z","updated_at":"2025-04-11T17:15:34.192Z","avatar_url":"https://github.com/mitchspano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LWC Refresh Demo\n\nThis project is meant to illustrate how to broker communications across all Aura and Lightning Web Components within the context of lightning pages. The classic example of this is the 'e.force:refreshView' event, but in theory this could be used to broker all communications between Aura application events and Lightning Web Components.\n\nIt is important to note that this solution will allow developers to allow for all components on the page (Aura or LWC) to be refreshed at the same time, no matter if the component initiating the refresh is Aura or LWC.\n\n\n### Simple Demonstration\nHere is a simple demonstration of a Lightning Web Component called accountEditor listening for refreshes from other components, as well as initializing the refresh.\n\nNote the chrome console log statements: \n* The accountEditor will log 'Listening to Refresh for LWC' when another component fires the Aura e.force:refreshView event\n* The accountEditor will log 'Calling Refresh from LWC' when it is initializing the refresh itself\n\n![Lightning Page](demo/refreshDemo.gif)\n\n### Sequence Diagrams\nThere are two basic flows for brokering in this way:\n\n##### Aura Initiated\n![Aura Initiated](demo/LWC%20Refresh%20Demo%20-%20Aura%20Initiated.JPG)\n\n##### LWC Initiated\n![LWC Initiated](demo/LWC%20Refresh%20Demo%20-%20LWC%20Initiated.JPG)\n\n\n### Adding Components to Lightning Page\nThis approach will only work if the brokerAura component is somewhere (location does not matter and the markup is empty, so nothing will be visible) on the Lightning page.\nIn this example, I have placed it above the highlights panel.\n\n![Lightning Page](demo/LightningPageBuilder.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchspano%2Flwcrefreshdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchspano%2Flwcrefreshdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchspano%2Flwcrefreshdemo/lists"}