<commit_before># Dream Code

// Component to wrap
```js
import configureFeature from 'react-feature-toggle';

const featureOr404 = configureFeature(NotFound);
// featureOrUpgrade, etc...

const Component = () => <div></div>;

export default featureOr404('feature name', Component);
```

```js
const configureFeature = ({ notFound }) => (featureName, Component, fallbackComponent = NotFound) => {
  // implementation
};
```

```js
// ... other page HOC imports

const export default = compose(
  featureToggle
  hoc1,
  hoc2,
);
```
<commit_msg>Update dreamcode.md<commit_after># Dream Code

## HOC to supply feature list as a prop
```js
// ... other page HOC imports

const export default = compose(
  withFeatures
  hoc1,
  hoc2,
);
```


## Conditionally render a component based on feature state
```js
import { configureFeature } from 'react-feature-toggle';

const featureOr404 = configureFeature(NotFound);
// featureOrUpgrade, etc...

const Component = () => <div></div>;

export default featureOr404('feature name', Component);
```

```js
const configureFeature = ({ notFound }) => (featureName, Component, fallbackComponent = NotFound) => {
  // implementation
};
```

{'fraction_non_alphanumeric': 0.15051020408163265, 'fraction_numerical': 0.013605442176870748, 'mean_word_length': 4.449074074074074, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '6092741', 'n_tokens_mistral': 363, 'n_tokens_neox': 335, 'n_words': 104}