{"size": 408, "ext": "js", "max_stars_repo_path": "src/Context.js", "max_stars_repo_name": "kleyu/react-hex-engine", "max_stars_repo_stars_event_min_datetime": "2018-12-25T23:54:44.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-04T19:19:38.000Z", "max_issues_repo_path": "src/Context.js", "max_issues_repo_name": "kleyu/react-hex-engine", "max_issues_repo_issues_event_min_datetime": "2019-06-10T07:59:52.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T13:43:06.000Z", "max_forks_repo_path": "src/Context.js", "max_forks_repo_name": "kleyu/react-hex-engine", "max_forks_repo_forks_event_min_datetime": "2019-06-07T14:02:41.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-13T22:43:38.000Z"}
{"max_stars_count": 8, "max_issues_count": 8, "max_forks_count": 3, "avg_line_length": 19.4285714286, "max_line_length": 54, "alphanum_fraction": 0.6862745098}
import React from "react";

export const HexEngineContext = React.createContext({
  layout: null,
  points: null,
  viewBox: null
});

export const {
  Consumer: HexEngineConsumer,
  Provider: HexEngineProvider
} = HexEngineContext;

export function withHexEngine(Component) {
  return props => (
    <HexEngineConsumer>
      {engine => <Component {...engine} {...props} />}
    </HexEngineConsumer>
  );
}
