import React from 'react'; const ListComponent = () => { const items = ['Item 1', 'Item 2', 'Item 3', 'Item 4']; return ( <div> <h2>List Component</h2> <ul> {items.map((item, index) => ( <li key={index}>{item}</li> ))} </ul> </div> ); }; export default ListComponent;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter