Adding state with a plugin

I’m developing a custom post type plugin. The message contains ciphertext, and I’m writing a client side plugin to display the post with a button that will decrypt the message (by calling an API exposed by the server side plugin).

How should the client side component store the decrypted text and the flag indicating the text has been decrypted? I created a new action to do the decrypt call, but it seems the action should take the response data and “dispatch” it to the redux store. But since I don’t have a corresponding reducer, the store state will be unaffected.

I looked at the actions in “storage.js”, which look like a promising way to store arbitrary k/v pairs in the store, but these actions are defined in mattermost-webapp, not mattermost-redux, so I’m not sure I’m supposed to use them.

Is there a way to add my own reducers to manage my plugin’s own state? Or should I avoid actions altogether and just store state in my react component? Thanks.

Hi @ansel1! Thank you for reporting this.

Giving you an update here that I have asked our engineers to take a look at this and the other ticket (Client side plugin control over authentication) you recently opened, and I’m hoping to have feedback from them soon.

Hi @ansel1!

I was wondering if you would like to optionally join our nightly build server and ask these questions either in the Developer Toolkit channel or Peer-to-peer Help channel - there is more traffic in the build server and our engineers usually respond to questions faster there.

Let me know any questions or concerns!