<commit_before>import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import { renderToStaticMarkup } from 'react-dom/server'
import { hasOwnProperty, canUseDom } from '../../shared'

const HAS_RESOLVED = 'ReactResolver.HAS_RESOLVED'
const IS_CLIENT = 'ReactResolver.IS_CLIENT'

export default class Resolver extends React.Component {

  static childContextTypes = {
    resolver: PropTypes.object,
  }

  static contextTypes = {
    resolver: PropTypes.object,
  }

  static defaultProps = {
    props  : {},
    resolve: {},
  }

  static displayName = 'Resolver'

  static propTypes = {
    children: PropTypes.func.isRequired,
    props   : PropTypes.object,
    resolve : PropTypes.object,
  }

  static renderClient = (render, node) => {
    ReactDOM.hydrate((
      <Resolver>
        {render}
      </Resolver>
    ), node)
  }

  static renderServer = (render, initialData = {}) => {
    const queue = []

    renderToStaticMarkup(
      <Resolver onResolve={(promise) => {
        queue.push(promise)

        return Promise.resolve(true)
      }}>
        {render}
      </Resolver>,
    )

    return Promise.all(queue).then((results) => {
      const formatResults = {}<commit_msg>fix(resolver): Check in the render client witch method to use<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import { renderToStaticMarkup } from 'react-dom/server'
import { hasOwnProperty, canUseDom } from '../../shared'

const HAS_RESOLVED = 'ReactResolver.HAS_RESOLVED'
const IS_CLIENT = 'ReactResolver.IS_CLIENT'

export default class Resolver extends React.Component {

  static childContextTypes = {
    resolver: PropTypes.object,
  }

  static contextTypes = {
    resolver: PropTypes.object,
  }

  static defaultProps = {
    props  : {},
    resolve: {},
  }

  static displayName = 'Resolver'

  static propTypes = {
    children: PropTypes.func.isRequired,
    props   : PropTypes.object,
    resolve : PropTypes.object,
  }

  static renderClient = (render, node) => {
    const renderMethod = !!module.hot ? ReactDOM.render : ReactDOM.hydrate

    renderMethod((
      <Resolver>
        {render}
      </Resolver>
    ), node)
  }

  static renderServer = (render, initialData = {}) => {
    const queue = []

    renderToStaticMarkup(
      <Resolver onResolve={(promise) => {
        queue.push(promise)

        return Promise.resolve(true)
      }}>
        {render}
      </Resolver>,
    )

    return Promise.all(queue).then((results) => {
      const formatResults = {}
{'fraction_non_alphanumeric': 0.11910286156225831, 'fraction_numerical': 0.0, 'mean_word_length': 2.9861325115562405, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '359321', 'n_tokens_mistral': 775, 'n_tokens_neox': 782, 'n_words': 180}