javascript - React js form field names and refs with concatenation -


hi trying concatenate form field names , refs , returning jsx

<select classname="lp-country" id="lp-country" name = 'country'{i} ref = 'country'{i} > 

where index of loop. getting unexpected token error.

code screenshot: https://www.screencast.com/t/8qilizabgmm

error screenshot: https://www.screencast.com/t/itzph6bvt

string interpolation not used correctly there.

replace

name = 'country'{i}  

with

name = {`country${i}`} 

same ref.


Comments

Popular posts from this blog

ios - Pass NSDictionary from Javascript to Objective-c in JavascriptCore -

java - How to handle special characters while unmarshalling xml in JAXB -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -