function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Lightning Web component CurrentPageReference returning undefined in Lightning Community

In  my Lightning Web Component I am using below code 

import { CurrentPageReference } from 'lightning/navigation';

I am getting value from the pageRef in Lightning Page but when I used same component in community it is returning undefined.

how can we get current page reference in community when we use Lightning Web Component.