Fork me on GitHub
#clojurescript
<
2020-04-08
>
scknkkrer13:04:08

Hi fellas. Are there any team for Lisp Game Jam ?

Kevin13:04:19

Sounds like fun, maybe I'll join the next jam 🙂

scknkkrer13:04:16

@kevin.van.rooijen, It will be fun! But I need friends to join.

Maik Wild18:04:38

Hi, I am not sure if this is the right channel to post this, so please point me to the right channel if I am wrong here. I am using reagent with material ui. I am trying to create multiple tables from a map inside a table container paper. My problem is. material-ui/table-container-paper does not accept options. So I cannot set a key. This will cause a react warning, which I want to avoid. Minimal reproducible example:

(doall (map (fn [counter]
                    [material-ui/table-container-paper 
                    [material-ui/table-body
                     [material-ui/table-row
                      [material-ui/table-cell counter]]]])
                  [1 2]))
This renders the table as expected, except it prints a warning that each child ina a list should have unique key prop. If I add a key:
(doall (map (fn [counter]
                    [material-ui/table-container-paper {:key counter}
                    [material-ui/table-body
                     [material-ui/table-row
                      [material-ui/table-cell counter]]]])
                  [1 2]))
It will not render a table at all, instead it renders {:key 1} {:key 2} If anyone can tell me a solution or point me in the right direction, that would be greatly appreciated.

Derek18:04:36

The key can be given either (as in this example) as meta-data, or as a `:key` item in the first argument to a component (if it is a map).

Derek18:04:48

Try the metadata approach

✔️ 4