I have two Components (Preview and FileInput) within single Provider. I want to trigger file field when clicking on preview image.
My code looks like (simplified):
<Provider>
<Form>
<Preview><ImagePlaceholder onClick={}/></Preview>
<FileUploader><input type="file"/><FileUploader/>
</Form>
</Propvider>
What is best way in react-redux flow to trigger one Component from another?
I think about flag in store. Something like "shouldClickFileInput". So on click on placeholder i would set it true, and on click on input - false.