Skip to content
Myr

Remove HTML `id` advice (#316)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

HTML5 lifted the restrictions on `id` values, which are now essentially any character sequence: https://mathiasbynens.be/notes/html5-id-class This was specced about 11 years ago and made with HTML ≤4.01 backwards compatibility in mind. It should be safe to no longer worry about this.

authored by Taylor Hunt · committed by GitHub · parent e420d89 · Browse files · 1 file+0 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−10 removed

  • other:+0 added−10 removed

1 file+0 added−10 removed

modified:README.md-10 removed
371 unmodified lines
372)373```374375376### HTML ID377378If you want to use Nano ID in the `id` prop, you must set some string prefix379(it is invalid for the HTML ID to start with a number).380381```jsx382<input id={'id' + this.id} type="text"/>383```384385376### React Native377378React Native does not have built-in random generator. The following polyfill379works for plain React Native and Expo starting with `39.x`.
137 unmodified lines