UNPKG

1.13 kBMarkdownView Raw
1## Melting Pot
2
3<p align="center">
4 <img src="https://badgen.net/npm/v/@withvoid/melting-pot" alt="">
5 <img src="https://badgen.net/badge/license/MIT/blue" alt="">
6 <img src="https://badgen.net/npm/dt/@withvoid/melting-pot" alt="">
7</p>
8
9The `@withvoid/melting-pot` package contains utilities, helper methods - your typical daily use functions (mostly in hooks).
10
11## Demo
12
13Hosted at 2 great platforms together.
14
15* Netlify: [melting-pot.netlify.com](https://melting-pot.netlify.com)
16* <strike>Zeits NOW: [melting-pot.now.sh](https://melting-pot.now.sh/)</strike> [Has issues, PR's are welcome]
17
18## Getting Started
19
20Install the package via npm or yarn:
21
22```js
23npm install @withvoid/melting-pot --save
24```
25
26Or if you prefer <b>yarn</b>
27
28```js
29yarn add @withvoid/melting-pot
30```
31
32Create your first application like so:
33
34```
35import React from "react"
36import { useWindowSize } from "@withvoid/melting-pot"
37
38const App = () => (
39 const {width, height} = useWindowSize();
40 <div>
41 <p>The current height of screen is {height}px</p>
42 <button type="button">
43 {width <= 340 ? 'Click': 'Click Me!'}
44 </button>
45 </div>
46)
47```
\No newline at end of file