How to use Redux with Vanilla JS in Gomix [solved]

How to use Redux with Vanilla JS in Gomix [solved]
0

#1

Hi guys,

I want to create a new Vanilla JS project in Redux and follow the Egghead.io Redux tutorials along with some friends using the awesome code collaboration tool HyperDev, now called GoMix.

Problem is, I’ve been trying to get it working and it’s always throwing errors when importing or creating an instance of createStore. Uncaught ReferenceError: redux is not defined

Using Gomix, how should I set my project up?

  • Do i need to configure some files in server.js (I thought maybe Babel)
  • is there something stupid I’m missing?

Here is a link to the project (anyone can edit it and remix it)
https://jewel-tulip.gomix.me

Thank you in advance!


#2

Haha, yes I was making it harder than it had to be!!!

I just added the script for redux from a different source and it seemed to work.

    <script src="https://unpkg.com/redux@latest/dist/redux.min.js"></script>```

#3

Yep that’s right! Redux is just JavaScript so you just have to include the library to begin using it.


#4

Yeah, i was more having trouble configuring the server.js file.
But yeah, it’s just for a front end proj so it’s no big deal if i use a CDN.