Code breaks syntax highlighting in Atom / Nuclide

273 views Asked by At

This Javascript / React Native code, which works just fine, breaks the syntax highlighting in Atom / Nuclide for anything that comes after it. Is there anything wrong with the code or is it the syntax highlighting engine?

static navigationOptions = {
    headerTitle: "TFN Top Headlines",
    headerTitleStyle: { fontFamily: "Iowan Old Style" },
    headerLeft: (
      <Icon
        size={35}
        onPress={() => {
          _this.toggleMenu();
        }}
        style={{
          marginLeft: 10
        }}
        name="navicon"
      />
    )
  };

enter image description here

1

There are 1 answers

0
Rob Walker On

You will need to install a Plug-in to support JSX formatting.

You could try https://atom.io/packages/language-babel