1 | # Hops Config
|
2 |
|
3 | [![npm](https://img.shields.io/npm/v/hops-config.svg)](https://www.npmjs.com/package/hops-config)
|
4 |
|
5 | **Please see the [main Hops Readme](../../DOCUMENTATION.md) for general information and a Getting Started Guide.**
|
6 |
|
7 | This is a package that exposes your applications configuration and is mostly here for legacy reasons. It has thus been [deprecated](../../DEPRECATIONS.md#dep0001) as of version 12 of Hops and will be removed with the next major release.
|
8 |
|
9 | Please use [`withConfig`](../../DOCUMENTATION.md#withconfigcomponent) or [`useConfig`](../../DOCUMENTATION.md#useconfig-config) to access the configuration inside your application's React components.
|
10 |
|
11 | Inside [mixins](../bootstrap#mixins) you can access the config through `this.config`.
|
12 |
|
13 | ### Installation
|
14 |
|
15 | Add this package as a dependency to your project:
|
16 |
|
17 | ```bash
|
18 | npm install --save hops-config
|
19 | ```
|
20 |
|
21 | If you don't already have an existing Hops project read this section [on how to set up your first Hops project.](../../DOCUMENTATION.md#quick-start)
|
22 |
|
23 | ### Usage
|
24 |
|
25 | `import` / `require` this package to access the configuration that you are interested in.
|
26 |
|
27 | ```javascript
|
28 | import config from 'hops-config';
|
29 |
|
30 | console.log(config.basePath);
|
31 | ```
|