<commit_before># refactored model injection

i realized that a unit of work is geared for calling setState. since you don't do that in a constructor, the old injection api is a little clumsy

```es6
constructor(props) {
  super(props);
  this.formState = new FormState(this);
  let context = this.formState.createUnitOfWork();
  this.state = context.injectModel(props.model);
  this.state = context.add('someOtherField', 'someValue');
}
```

it is now

```es6
constructor(props) {
  super(props);
  this.formState = new FormState(this);
  this.state = this.formState.injectModel(props.model);
  this.formState.add(this.state, 'someOtherField', 'someValue');
}
```

(the old way still works but i hid it from the examples and put in in the deprecated section in the documentation)<commit_msg>Update refactoredInjection.md<commit_after># refactored model injection

i realized that a unit of work is geared for calling setState. since you don't do that in a constructor, the old injection api is a little clumsy

```es6
constructor(props) {
  super(props);
  this.formState = new FormState(this);
  let context = this.formState.createUnitOfWork();
  this.state = context.injectModel(props.model);
  this.state = context.add('someOtherField', 'someValue');
}
```

it is now

```es6
constructor(props) {
  super(props);
  this.formState = new FormState(this);
  this.state = this.formState.injectModel(props.model);
  this.formState.add(this.state, 'someOtherField', 'someValue');
}
```

of course if necessary you can still use a unit of work for injection

```es6
constructor(props) {
  super(props);
  this.formState = new FormState(this);
  this.state = {};
}
componentDidMount() {
  this.props.getModel().then((model) => {
    let context = this.formState.createUnitOfWork();
    context.injectModel(model);
    context.add('someOtherField', 'someValue');
    context.updateFormState();
  });
}
```
{'fraction_non_alphanumeric': 0.12690889942074776, 'fraction_numerical': 0.0026329647182727752, 'mean_word_length': 4.828220858895706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '6510229', 'n_tokens_mistral': 600, 'n_tokens_neox': 581, 'n_words': 172}