redux-state-sync icon indicating copy to clipboard operation
redux-state-sync copied to clipboard

Feature Request: modify actions

Open rowrowrowrow opened this issue 3 years ago • 4 comments

Hi, thanks for the great package!

Would you consider adding a function to the configuration for modifying the actions before they are sent?

rowrowrowrow avatar Mar 12 '21 16:03 rowrowrowrow

Yea, sure, but could you provide a use case?

aohua avatar Mar 13 '21 00:03 aohua

Of course and thanks!

I'd like to modify portions of state before they are sent depending on whether broadcastchannel is available and don't have a feasible way to separate those pieces otherwise. I.e. if there will be storage limitations that prevent the sending and receiving via the fallbacks for broadcastchannel.

rowrowrowrow avatar Mar 16 '21 21:03 rowrowrowrow

@aohua I see a few issues that might cause someone to want to modify an action before it's shared. Namely general performance, storage limitations when broadcast channel isn't available, and the structured clone algorithm causing errors if some part of an action is not clonable.

rowrowrowrow avatar Feb 14 '22 04:02 rowrowrowrow

@aohua bump

rowrowrowrow avatar Jan 05 '23 23:01 rowrowrowrow