Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Add explanation about debug usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mkxml committed May 10, 2016
1 parent 79d7ff4 commit 4b38fe7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -158,6 +158,26 @@ class Greet extends React.Component {
export default Greet;
```

### Debugging updates

We use [debug](https://github.com/visionmedia/debug) to log component updates when in development environment and when debugging is enabled.

You can test this by enabling the namespace `ReactUpdateHelper` in `debug`.

Or you can just enable all namespaces with `*`.

In the browser you can do that as follows:

```javascript
// Just enabling react-update-helper messages
window.localStorage.debug = 'ReactUpdateHelper';

// Enabling all debug-powered logs
window.localStorage.debug = '*';
```

See more about debug in their [repository page](https://github.com/visionmedia/debug).

### Optimized in production

As React does, we disable any debug code when performing a production build.
Expand Down

0 comments on commit 4b38fe7

Please sign in to comment.