Open History to see the last commit
1---
2id: installation
3title: Installation
4---
5β
6You can install React Query via [NPM](https://npmjs.com),
7or a good ol' `<script>` via
8[unpkg.com](https://unpkg.com).
9β
10### NPM
11β
12```bash
13$ npm i @tanstack/react-query
14```
15β
16React Query is compatible with React v16.8+ and works with ReactDOM and React Native.
17β
18> Wanna give it a spin before you download? Try out the [simple](/docs/examples/simple) or [basic](/docs/examples/basic) examples!
19β
20### CDN
21β
22If 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:
23β
24```html
25<script src="https://unpkg.com/react-query/dist/react-query.production.min.js"></script>
26```
27β
28Once you've added this you will have access to the `window.ReactQuery` object and its exports.
29β
30> This installation/usage requires the [React CDN script bundles](https://reactjs.org/docs/cdn-links.html) to be on the page as well.
31β
32### Requirements
33β
34React Query is optimized for modern browsers. It is compatible with the following browsers config
35β
36```
37Chrome >= 73
38Firefox >= 78
39Edge >= 79
40Safari >= 12.0
41iOS >= 12.0
42opera >= 53
43```
44β
45> Depending on your environment, you might need to add polyfills. If you want to support older browsers, you need to transpile the library from `node_modules` yourselves.