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.