<commit_before># react-component-update

[![Build Status](https://travis-ci.org/wimpyprogrammer/react-component-update.svg?branch=master)](https://travis-ci.org/wimpyprogrammer/react-component-update)
[![codecov](https://codecov.io/gh/wimpyprogrammer/react-component-update/branch/master/graph/badge.svg)](https://codecov.io/gh/wimpyprogrammer/react-component-update)

Adds convenience lifecycle events to your React components.

 - `componentWillMountOrReceiveProps(nextProps)` - Combines the [`componentWillMount()`](https://facebook.github.io/react/docs/react-component.html#componentwillmount) and [`componentWillReceiveProps(nextProps)`](https://facebook.github.io/react/docs/react-component.html#componentwillreceiveprops) events.  This allows you to consolidate all pre-`render()` logic.
 
 - `componentDidMountOrUpdate(prevProps, prevState)` - Combines the [`componentDidMount()`](https://facebook.github.io/react/docs/react-component.html#componentdidmount) and [`componentDidUpdate(prevProps, prevState)`](https://facebook.github.io/react/docs/react-component.html#componentdidupdate) events.  This allows you to consolidate all post-`render()` logic.

## Installation

Published on `npm` as [`react-component-update`](https://www.npmjs.com/package/react-component-update).

npm users:
```
npm install --save react-component-update
```

yarn users:
```
yarn add react-component-update
```

`react-component-update` does not include its own version of React.  It will use whatever version is already installed in your project.

## Usage<commit_msg>Add Snyk badge to README<commit_after># react-component-update

[![Build Status](https://travis-ci.org/wimpyprogrammer/react-component-update.svg?branch=master)](https://travis-ci.org/wimpyprogrammer/react-component-update)
[![codecov](https://codecov.io/gh/wimpyprogrammer/react-component-update/branch/master/graph/badge.svg)](https://codecov.io/gh/wimpyprogrammer/react-component-update)
[![Known Vulnerabilities](https://snyk.io/test/github/wimpyprogrammer/react-component-update/badge.svg)](https://snyk.io/test/github/wimpyprogrammer/react-component-update)

Adds convenience lifecycle events to your React components.

 - `componentWillMountOrReceiveProps(nextProps)` - Combines the [`componentWillMount()`](https://facebook.github.io/react/docs/react-component.html#componentwillmount) and [`componentWillReceiveProps(nextProps)`](https://facebook.github.io/react/docs/react-component.html#componentwillreceiveprops) events.  This allows you to consolidate all pre-`render()` logic.
 
 - `componentDidMountOrUpdate(prevProps, prevState)` - Combines the [`componentDidMount()`](https://facebook.github.io/react/docs/react-component.html#componentdidmount) and [`componentDidUpdate(prevProps, prevState)`](https://facebook.github.io/react/docs/react-component.html#componentdidupdate) events.  This allows you to consolidate all post-`render()` logic.

## Installation

Published on `npm` as [`react-component-update`](https://www.npmjs.com/package/react-component-update).

npm users:
```
npm install --save react-component-update
```

yarn users:
```
yarn add react-component-update
```

`react-component-update` does not include its own version of React.  It will use whatever version is already installed in your project.

## Usage
{'fraction_non_alphanumeric': 0.14463311097634932, 'fraction_numerical': 0.0, 'mean_word_length': 6.187363834422658, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 20, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4163730', 'n_tokens_mistral': 1019, 'n_tokens_neox': 972, 'n_words': 171}