Skip to content

Update react.md to use imported Component #59

Open
@joshwcomeau

Description

@joshwcomeau

I believe it's safe to say, after the internal vote, that people prefer:

import React, {Component} from "react";

class Thing extends Component { ... }

over

import React from "react";

class Thing extends React.Component { ... }

The examples in react.md all use the React.Component style, so we should update them to just extend Component. We can also add a blurb about the import convention?

cc @kevinbarabash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions