Open History to see the last commit
1---
2id: installation
3title: Installation
4---
5β
6You can install React Query with [NPM](https://npmjs.com),
7[Yarn](https://yarnpkg.com), or a good ol' `<script>` via
8[unpkg.com](https://unpkg.com).
9β
10### NPM
11```bash
12$ npm i react-query
13```
14### Yarn
15β
16```bash
17$ yarn add react-query
18```
19β
20β
21β
22React Query is compatible with React v16.8+ and works with ReactDOM and React Native.
23β
24> Wanna give it a spin before you download? Try out the [simple](/docs/examples/simple) or [basic](/docs/examples/basic) examples!
25β
26### CDN
27β
28If you're not using a module bundler or package manager we also have a global ("UMD") build hosted on the [unpkg.com](https://unpkg.com) CDN. Simply add the following `<script>` tag to the bottom of your HTML file:
29β
30```html
31<script src="https://unpkg.com/react-query/dist/react-query.production.min.js"></script>
32```
33β
34Once you've added this you will have access to the `window.ReactQuery` object and its exports.
35β
36> This installation/usage requires the [React CDN script bundles](https://reactjs.org/docs/cdn-links.html) to be on the page as well.