How do I retrieve data with Plasmo storage api

I have the following code in a JSX component

  const [selectedDeck, setSelectedDeck] = useStorage("selectedDeck", null)
...
setSelectedDeck(deck)


In my contents/highlighter.ts file i have the following code:
const storage = new Storage()

class MediumHighlighter extends HTMLElement {
  ...
  async highlightSelection() {
    ...
    const selectedDeck: any = await storage.get("selectedDeck") 
    console.log("selectedDeck: " + selectedDeck)
    ...
  }
}


I have already verified that in the JSX component that setSelectedDeck is setting selectedDeck properly but I get null when I log from my contents/highlighter.ts
Was this page helpful?