Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am new with react and i need help.
I created a element class that use in props. so when i want to call this element is can do it like that:
<product />
and then use in name (props.name) as parameter in the class element(http get request).
As I am understand i must to write this in "index.js":
ReactDOM.render(
    <Productslist name = "asdsadd" />,
    document.getElementById('pl')
);


and when i want i can call it from html files.
But, i want to give diffrent "name" to each element. So how can i do that?

What I have tried:

JavaScript
ReactDOM.render(
    ,
    document.getElementById('pl')
);
Posted
Updated 15-Nov-17 21:15pm
v2
Comments
Karthik_Mahalingam 16-Nov-17 1:45am    
not clear
Use Improve question to add more info to the question.

attributes will have '=' sign
Tzuriely 16-Nov-17 3:16am    
More clear now?
Karthik_Mahalingam 16-Nov-17 4:30am    
what is the issue?
Tzuriely 16-Nov-17 5:01am    
If i call to react element from html file and want to add parameters how can I do that, because when I try <exmaple name="bla" /> its now work

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900