1 回答
TA贡献1829条经验 获得超4个赞
const [frontEndProjects, setFrontEndProjects] = useState([
{ name: "Imobile Shop", href: "" },
{ name: "Portfolio template", href: "" },
{ name: "Responsive Design Practice", href: "" },
]);
const [machineLearningProjects, setMachineLearningProjects] = useState([
{ name: "Hazel AI", href: "" },
]);
const [backEndProjects, setBackEndProjects] = useState([
{ name: "My Little Market", href: "" },
{ name: "Todo List app", href: "" },
]);
const [webScrapingProjects, setWebScrapingProjects] = useState([
{ name: "Business list", href: "" },
{ name: "Weather Scraper", href: "" },
{ name: "Amazon Price Tracker (done deployement soon)", href: "" },
]);
const [javaScriptProjects, setJavaScriptProjects] = useState([
{ name: "Javascript: Blackjack - Rock Paper Scissors", href: "" },
{ name: "Instagram clone ReactJs", href: "" },
{ name: "Facebook Messenger clone ReactJs", href: "" },
{ name: "Netflix clone ReactJs", href: "" },
{ name: "Amazon clone ReactJs", href: "" },
{ name: "Tinder clone ReactJs ( Under Dev )", href: "" },
{ name: "Youtube clone ReactJs (LIVE DEMO soon)", href: "" },
{ name: "Spotify clone ReactJs (LIVE DEMO soon)", href: "" },
]);
const [dataScienceProjects, setDataScienceProjects] = useState([
{ name: "Process workbook-Edting Excel files", href: "" },
]);
function ProjectsItem(props) {
<div className="project-inner-container">
<ul>
{props.projects.map((project) =>
(<li>{project.name}</li>))}
</ul>
</div>
}
这应该可以做到。我删除了projectInfos,因为这里不需要它,但如果您出于某种原因需要它,
[
{ projectInfo: { name: "name1", href: "" } },
{ projectInfo: { name: "name2", href: "" } },
]
{props.projects.map((project) =>
(<li>{project.projectInfo.name}</li>))}
会做的。
添加回答
举报