UNPKG

1.2 kBMarkdownView Raw
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
7This 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
9Please use [`withConfig`](../../DOCUMENTATION.md#withconfigcomponent) or [`useConfig`](../../DOCUMENTATION.md#useconfig-config) to access the configuration inside your application's React components.
10
11Inside [mixins](../bootstrap#mixins) you can access the config through `this.config`.
12
13### Installation
14
15Add this package as a dependency to your project:
16
17```bash
18npm install --save hops-config
19```
20
21If 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
28import config from 'hops-config';
29
30console.log(config.basePath);
31```