Skip to content

Conversation

marcagba
Copy link
Contributor

@marcagba marcagba commented Feb 16, 2021

Fixes #224

Changes

  • Reverse parameters of the Belt.Array.mapWithIndex call
  • Convert index i to string
  • Also highlight the first line of the example (as a newcomer to rescript you're likely to ignore that you need a different function to access index within a map call).

Before

Capture d’écran 2021-02-17 à 00 28 10

After

Capture d’écran 2021-02-17 à 00 27 59

* Use correctly `Belt.Array.mapWithIndex`
* Convert index to string
* Highlight first line (as a newcommer to rescript you're likely to
ignore that you need a different function to access index within a map
call).
@ryyppy ryyppy merged commit c676d83 into rescript-lang:master Feb 17, 2021
@ryyppy
Copy link
Member

ryyppy commented Feb 17, 2021

woops, thanks!

@marcagba marcagba deleted the fix/rescript-react-index-as-key-example branch February 17, 2021 19:16
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.

[docs/react] Incorrect example for item index as key
2 participants