Creating our first store
To be able to use Redux features inside our index.html
file, we need to import the Redux library. There are several ways of doing this, from downloading the code locally and importing it via a <script />
source tag, to installing it with a package manager such as npm.
Between the options of using npm or downloading the code locally, there is a tool called unpkg, a global content delivery network for everything that is published on npm. With this, we can easily load any file from any package using a URL.
So, let's modify the previous HTML snippet:
<!DOCTYPE html> <html lang="en"> <head> Â Â <meta charset="UTF-8"> Â Â <meta name="viewport" content="width=device-width, initial-Â Â scale=1.0"> Â Â <title>Document</title> </head> <body> Â Â <h1>Redux Example</h1> Â Â <script src="https...