What is the difference between the two ways of writing react's Fragment,?

What is the difference between the following two ways of writing the Fragment, of

react?

Writing method 1:

import React, { Fragment } from "react";

render() {
    return (
        <Fragment>
            hello world
        </Fragment>
    );
}

Writing method 2:

import React from "react";

render() {
    return (
        <>
            hello world
        </>
    );
}
Dec.03,2021

the one below is the shortcut https://reactjs.org/docs/reac.

Menu