I have an input field that the user types into. This Input field looks like this:
// within React component render function:
...
<input
id="autoComplete"
className={inputClasses}
type="text"
// used to display user typed words in input field
ref={this.inputRef}
// onchange is used to store value in redux store
onChange={this.inputChangeHandler}
/>
In the above code, the 'ref' is for displaying the user typed letter in the input field. However, I also have Google Maps Autocomplete integrated into this input field. The Autocomplete feature works fine & when the user clicks on one of the autocomplete results, the input field is populated by that name & onChange handler stores the value within the redux store.
So far, so good. However, now, when the user navigates to another section of the site, how do I populate the input field with the value within the redux store. There is no 'value' attribute on the input field, & its using React's ref method.
Thank you