Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] @plasmohq/redux #225

Open
3 tasks done
ghabs opened this issue Sep 21, 2022 · 3 comments
Open
3 tasks done

[RFC] @plasmohq/redux #225

ghabs opened this issue Sep 21, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@ghabs
Copy link

ghabs commented Sep 21, 2022

How do you envision this feature/change to look/work like?

Per the request in the docs, I want to express my interest and support in getting the redux library to work with content scripts.

What is the purpose of this change/feature? Why?

Currently as a workaround I'm implementing messaging from a content script to a background script to trigger updates in the content scripts, but it would be nice to have a single unified approach for monitoring and updating state changes throughout the app.

(OPTIONAL) Example implementations

No response

(OPTIONAL) Contact Details

No response

Verify canary release

  • I verified that the issue exists in plasmo canary release

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@ghabs ghabs added the enhancement New feature or request label Sep 21, 2022
@louisgv louisgv added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Sep 21, 2022
@louisgv
Copy link
Contributor

louisgv commented Sep 21, 2022

BTW @ColdSauce why doesn't the redux thingy work with content-script? I thought that if it synced using our storage package, it should able to sync on the content script side too?

I.e, in my mind, the user can use the Storage module on the content-script side to watch for changes ;d...

@ColdSauce
Copy link
Contributor

Hey @ghabs thanks for the request! Sorry to hear you're having trouble with using Redux in content scripts. We can't promise to fix this in the near term just because we have a lot on our plate, but if you'd like to help us fix it, we can provide tips/help along the way.

A month ago, someone in our Discord community was looking to fix Redux in content scripts. I just reached out to them to see if they had any good insights or potential fixes they implemented that could help you + future readers out!

@louisgv, we had a conversation happening on Discord about this a month or so ago. Posting it here to give some more context

here's some issue with the storage provider that causes it not to work in content scripts

https://github.com/ssorallen/redux-persist-webextension-storage

this is the engine that we use for persisting state

Looks like this is related: ssorallen/redux-persist-webextension-storage#2

@louisgv louisgv changed the title [RFC] Redux for Content Script [RFC] @plasmohq/redux Oct 4, 2022
@pixelkoduje
Copy link

Has anything changed since then in the context of how redux works in content scripts? It's been 3/4 years since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants