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
Vishwas B NVishwas B N 

how to set value to Properties

Hi Team,

I am navigating from page A to page B using navigationMixin.navigate and in connectedcallback of page B iam assigning values to the component propery from localStorage.

But when i call another function for logical operation the assigned value as not available.

Can you help me how can i do that..

 
Yogendra JangidYogendra Jangid
Hi Vishwas, when you navigate from Page A to Page B using navigationMixin.navigate please use query parameters which will use prefix as '__c' and put in state property.
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_page_reference_type

now when you are retrieving those query parameters in component B, instead of using connectedcallback you can use the @wire pagereference to get the query parameters and do your logic.
For reference you can refer to this @wire pageReference module 
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_navigate_add_params_url

Hope this answers to your question, if so please can you mark this as best answer for future reference.