How can you get Redux to work in CodePen?

I am currently working on the Random Quote Generator. I have it working with React alone, but also want to use Redux, just for practice. I have tried to make it work for hours, and finally decided to try to get the React and Redux: Extract Local State into Redux freeCodeCamp lesson to work on CodePen, but even that is not being rendered. I have the Babel JavaScipt Preprocessor enabled and added the React, ReactDOM, Redux, and React-Redux external sources. Here is a link to my rendition of the freeCodeCamp lesson. Thanks for any help.

Btw, I just edited the ReactDOM.render(), but the lesson still does not show.

I can’t remember if it can go in the JS settings, or whether it has to be linked in the head (which you add in the HTML settings). Access like Redux.createStore etc

1 Like

Looks like it is on the window object window.ReactRedux (when looking at the Codepen (index.html) context).

BTW, you have the HTML twice and you didn’t close the head element correctly.

1 Like

Thanks a lot for your help! I noticed that my issue was that I was using ReactDOM.render(<Container/>, document.getElementById('react-redux-component'));, instead of ReactDOM.render(<AppWrapper/>, getElementById('react-redux-component'));, when I was trying to render the freeCodeCamp lesson. I thought you could just pick the container component and render it.

I finally built the Random Quote Generator with React and Redux! Now I just have to style it. Thanks again!