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

4x4 Matrix in Python -

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -

python - PyInstaller UAC not working in onefile mode -