acdlite / recompose

A React utility belt for function components and higher-order components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Convert array into single fragment

rockmandash opened this issue · comments

Hello, thank for this wonderful library.
I was wondering if you can add a utility which can convert array into single fragment, so you can ignore key prop.
I've implemented by myself.

import React, { Fragment } from 'react';
export default arr => React.createElement(Fragment, null, ...arr);

Don't know if it is useful enough to add to your library.

Just wondering why would someone want to avoid key prop? Are there any benefits of using Fragment over array with key?