Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unique key for html collection elements #86

Merged
merged 2 commits into from
Jan 8, 2016

Conversation

tristanstraub
Copy link
Contributor

  • Added function html-val which uses an index to set the key
  • Modified join-html to call html-val with an index instead of html

This fixes the following card which complains about duplicate keys in react:

(defcard devcard-inspect
  (fn [data _]
    (reagent/as-element
     [:button {:on-click #(swap! data conj ".")} "Just one bite!"]))
  ["."]
  {:inspect-data true})

- Added function html-val which uses an index to set the key
- Modified join-html to call html-val with an index instead of html
bhauman pushed a commit that referenced this pull request Jan 8, 2016
Use unique key for html collection elements
@bhauman bhauman merged commit 0c9c0e5 into bhauman:master Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants