<commit_before># flight-with-state

[![Build Status](https://secure.travis-ci.org/flightjs/flight-with-state.png)](http://travis-ci.org/flightjs/flight-with-state)

A [Flight](https://github.com/flightjs/flight) mixin for storing and reacting to change in a component's internal state.

## Installation

```bash
npm install --save flight-with-state
```

## Example

Here's an example component that uses with `withState`.

```js
var ToggleButton = flight.component(
    // Use `withState` before your component definition.
    withState,
    function toggleButton() {
        this.attributes({
            initiallyActive: false
        });<commit_msg>docs: document lodash peer dep<commit_after># flight-with-state

[![Build Status](https://secure.travis-ci.org/flightjs/flight-with-state.png)](http://travis-ci.org/flightjs/flight-with-state)

A [Flight](https://github.com/flightjs/flight) mixin for storing and reacting to change in a component's internal state.

## Installation

```bash
npm install --save flight-with-state
```

This module requires `lodash.merge` as a peer dependency.

## Example

Here's an example component that uses with `withState`.

```js
var ToggleButton = flight.component(
    // Use `withState` before your component definition.
    withState,
    function toggleButton() {
        this.attributes({
            initiallyActive: false
        });
{'fraction_non_alphanumeric': 0.12971014492753624, 'fraction_numerical': 0.0, 'mean_word_length': 3.7294520547945207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '1231166', 'n_tokens_mistral': 430, 'n_tokens_neox': 402, 'n_words': 110}