<commit_before>'use strict';

import Component from 'metal-component';
import IncrementalDomRenderer from 'metal-incremental-dom';

/**
 * Provides a redux store instance to all descendant components.
 */
class Provider extends Component {
	/**
	 * Defines the store as a child context, meaning that it will be passed down
	 * to all descendant components.
	 * @override
	 */
	getChildContext() {
		return {
			store: this.config.store
		};
	}
}

/**
 * The renderer used by `Provider`.
 */
class ProviderRenderer extends IncrementalDomRenderer {
	/**
	 * Renders a wrapper element for the provider (since it's required by
	 * Metal.js), and its children inside it.
	 * @override
	 */
	renderIncDom() {
		IncrementalDOM.elementOpen('div');
		this.component_.config.children();
		IncrementalDOM.elementClose('div');
	}
}

Provider.RENDERER = ProviderRenderer;

export default Provider;
<commit_msg>Renders children in Provider through IncrementalDomRenderer.renderChild - Fixes #2<commit_after>'use strict';

import Component from 'metal-component';
import IncrementalDomRenderer from 'metal-incremental-dom';

/**
 * Provides a redux store instance to all descendant components.
 */
class Provider extends Component {
	/**
	 * Defines the store as a child context, meaning that it will be passed down
	 * to all descendant components.
	 * @override
	 */
	getChildContext() {
		return {
			store: this.config.store
		};
	}
}

/**
 * The renderer used by `Provider`.
 */
class ProviderRenderer extends IncrementalDomRenderer {
	/**
	 * Renders a wrapper element for the provider (since it's required by
	 * Metal.js), and its children inside it.
	 * @override
	 */
	renderIncDom() {
		IncrementalDOM.elementOpen('div');
		this.component_.config.children.forEach(IncrementalDomRenderer.renderChild);
		IncrementalDOM.elementClose('div');
	}
}

Provider.RENDERER = ProviderRenderer;

export default Provider;

{'fraction_non_alphanumeric': 0.10446194225721785, 'fraction_numerical': 0.0005249343832020997, 'mean_word_length': 4.193460490463215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5766585', 'n_tokens_mistral': 587, 'n_tokens_neox': 527, 'n_words': 171}