const state = store.getState();
`<script>
window.__INITIAL_STATE__ = ${state};
</script>`
const state = { ...window.__INITIAL_STATE__ };
const store createStore(rootReducer, state, enhancer);
class Parent extends React.Component {
state = { imgLeft: '' };
changeImgLeft = (imgLeft) => {
this.setState({ imgLeft });
};
// ...
}
<SliderGallery imgLeft={this.state.imgLeft} changeImgLeft={this.changeImgLeft} />
class SliderGallery extends Component {
componentDidMount() {
// ...
this.props.changeImgLeft(b64Start + svg64);
}
const parseQueryString = str => {
const acc = {};
str.replace(/([^?&=]+)=([^&]+)/g, (_, key, value) => acc[key] = value);
return acc;
}
Собирать информацию по крупицам в интернете ни в коем случае не советую.