/* @flow */

import React from "react";
import { observer } from "mobx-react";

import type Kernel from "./../kernel";
import typeof store from "./../store";

type Props = {
  store: { kernel: ?Kernel, configMapping: Map<string, mixed> },
  onClick: Function
};

const StatusBar = observer(
  ({ store: { kernel, configMapping }, onClick }: Props) => {
    if (!kernel || configMapping.get("Hydrogen.statusBarDisable")) return null;
    return (
      <a onClick={onClick}>
        {kernel.displayName} | {kernel.executionState}
      </a>
    );
  }
);

export default StatusBar;

/* @flow */

import React from "react";
import { observer } from "mobx-react";

import typeof store from "./../store";

@observer
class StatusBar extends React.Component<{ store: store, onClick: Function }> {
  render() {
    const { kernel, configMapping } = this.props.store;
    if (!kernel || configMapping.get("Hydrogen.statusBarDisable")) return null;
    return (
      <a onClick={this.props.onClick}>
        {kernel.displayName} | {kernel.executionState}
      </a>
    );
  }
}

export default StatusBar;

Change `StatusBar` into React-Class component from stateless function
Change `StatusBar` into React-Class component from stateless function
