2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-24 14:04:06 +03:00
Files
bbob/packages/bbob-react
Greg Venech 3d5c1f19d5 fix(bbob-react): remove unique "key" prop warning (#30)
When using `@bbob/react`s `<BBCode>` component, the following error is thrown
if this change is not included...

```
Warning: Each child in a list should have a unique "key" prop.
```

Mentioned in #28
2019-06-29 18:18:39 +02:00
..
2019-06-18 09:56:21 +02:00
2019-06-18 09:56:21 +02:00

@bbob/react

import React from 'react'
import BBCode from '@bbob/react';
import presetReact from '@bbob/preset-react';

const plugins = [presetReact()];

export default () => (
    <BBCode plugins={plugins}>
    [table]
      [tr]
          [td]table 1[/td]
          [td]table 2[/td]
      [/tr]
      [tr]
          [td]table 3[/td]
          [td]table 4[/td]
      [/tr]
    [/table]
    </BBCode>
)
import { render } from '@bbob/react'

export default () => render(`
[table]
  [tr]
      [td]table 1[/td]
      [td]table 2[/td]
  [/tr]
  [tr]
      [td]table 3[/td]
      [td]table 4[/td]
  [/tr]
[/table]
`)