An open API service indexing awesome lists of open source software.

https://github.com/vigneshshanmugam/react-memorystats

React Component for Memory Stats
https://github.com/vigneshshanmugam/react-memorystats

component memory react

Last synced: 9 months ago
JSON representation

React Component for Memory Stats

Awesome Lists containing this project

README

          

# react-memory-stats

This Component is based on Paul Irish's [memory-stats](https://github.com/paulirish/memory-stats.js).

![image](http://i.imgur.com/eUCFcAH.gif)

### Installation

```javascript
yarn add react-memorystats
```

### Usage

```
import { render } from 'react-dom';
import MemoryStatsComponent from 'react-memorystats';

render(
,
document.getElementById("container")
);
```

#### Config

+ corner - topLeft, topRight (default), bottomLeft, bottomRight

check the example code [here](https://github.com/vigneshshanmugam/react-memory-stats/blob/master/example).

### Start Chrome with `--enable-precise-memory-info`

```
# Linux
google-chrome --enable-precise-memory-info --enable-memory-info

#MacOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-precise-memory-info --enable-memory-info
```

Otherwise the results from performance.memory are bucketed and less useful.

### Development

```javascript
// install dependencies
yarn install
// run example locally and start server
yarn start

```