Text element does not accept numbers in properties
See original GitHub issueThats work:
const value = '50';
<Text>{value}</Text>
But this does not:
const value = 50;
<Text>{value}</Text>
This also does not work:
const x = 10;
<Text x={x}>some text</Text>
I forked magicismight/react-native-svg-example
and show bugs in the expose-text-bug
branch: https://github.com/vovkasm/react-native-svg-example/tree/expose-text-bug
To show:
git clone https://github.com/vovkasm/react-native-svg-example.git
git checkout expose-text-bug
npm install
npm start
react-native run-ios
I did not test android, only iOS.
BTW. Internal example in Example
folder completely broken and requires bunch of exponent staff. In current stage it cannot be used for testing. (((
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
<input type="number"> - HTML: HyperText Markup Language
<input> elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries.
Read more >How to make HTML input tag only accept numerical values?
You can use the <input> tag with attribute type='number'. This input field allows only numerical values. You can also specify the minimum value ......
Read more >Restrict an HTML input text box to allow only numeric values
This post will discuss how to restrict an HTML input text box to allow only numeric values... The standard solution to restrict a...
Read more >Textbox - LongRange
An integer that specifies the maximum number of characters the textbox would accept. A special value of 0 indicates that no limit would...
Read more >HTML Input Attributes - W3Schools
The size attribute works with the following input types: text, search, tel, url, email, and password. · When a maxlength is set, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix is shipped in 5.1.3
Thanks for reporting this. I’ll fix this soon. I had tested the number text by using this, and this works fine.
But I haven’t expected this would go wrong: