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# or
15$ yarn add @tanstack/react-query
16```
17β
18React Query is compatible with React v16.8+ and works with ReactDOM and React Native.
19β
20> Wanna give it a spin before you download? Try out the [simple](/query/v4/docs/examples/react/simple) or [basic](/query/v4/docs/examples/react/basic) examples!
21β
22### CDN
23β
24If 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:
25β
26```html
27<script src="https://unpkg.com/@tanstack/react-query@4/build/umd/index.production.js"></script>
28```
29β
30Once you've added this you will have access to the `window.ReactQuery` object and its exports.
31β
32> This installation/usage requires the [React CDN script bundles](https://reactjs.org/docs/cdn-links.html) to be on the page as well.
33β
34### Requirements
35β
36React Query is optimized for modern browsers. It is compatible with the following browsers config
37β
38```
39Chrome >= 73
40Firefox >= 78
41Edge >= 79
42Safari >= 12.0
43iOS >= 12.0
44opera >= 53
45```
46β
47> 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.