map function in react
function NameList() {
const names = ['Bruce', 'Clark', 'Diana']
return (
<div>
{names.map(name => <h2>{name}</h2>)}
</div>
)
}
map function in react
function NameList() {
const names = ['Bruce', 'Clark', 'Diana']
return (
<div>
{names.map(name => <h2>{name}</h2>)}
</div>
)
}
jsx map with index
materials.map((material,index) => console.log(index +" = " + material + " = " + materials[index]));
react create list of array in react
const App = props => {
const quoteArray = props.quotes.map((quote) => {
return (
<Quote text={quote.text} author={quote.author} />
);
});
return (
<div>
<h2>Famous Quotes</h2>
{quoteArray}
</div>
);
};
App.propTypes = {
quotes: React.PropTypes.array
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us