EDS global state | Community
Skip to main content
Level 2
October 21, 2024
Solved

EDS global state

  • October 21, 2024
  • 2 replies
  • 934 views

It's possible to create a global state, similar to redux ( maybe? ), that we can use to share date between components. Blocks now have to do their own requests, which is not very optimal if they share the same data .

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by EstebanBustamante

Hi,

 

I don’t think there’s a concept of "global state" in EDS. The whole idea is to keep it simple using JavaScript, so you should use native methods to share data across components. You could explore options like global JavaScript variables, session storage, local storage, etc.

 

Hope this helps

2 replies

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
October 28, 2024

Hi,

 

I don’t think there’s a concept of "global state" in EDS. The whole idea is to keep it simple using JavaScript, so you should use native methods to share data across components. You could explore options like global JavaScript variables, session storage, local storage, etc.

 

Hope this helps

Esteban Bustamante
arunpatidar
Community Advisor
Community Advisor
October 31, 2024