Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morrismagic/react1
https://github.com/morrismagic/react1
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/morrismagic/react1
- Owner: MorrisMagic
- Created: 2024-11-02T19:54:28.000Z (12 days ago)
- Default Branch: main
- Last Pushed: 2024-11-02T19:55:29.000Z (12 days ago)
- Last Synced: 2024-11-02T20:27:11.521Z (12 days ago)
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
// product.js
const product = {
name: "Sample Product",
price: "$29.99",
description: "This is a great product!",
image: "https://via.placeholder.com/150"
};
export default product;import React from "react";
import product from "./product";function Name() {
return{product.name}
;
}export default Name;
import React from "react";
import product from "./product";function Price() {
return{product.price}
;
}export default Price;
import React from "react";
import product from "./product";function Description() {
return{product.description}
;
}export default Description;
import React from "react";
import product from "./product";function Image() {
return ;
}export default Image;
import React from "react";
import Name from "./Name";
import Price from "./Price";
import Description from "./Description";
import Image from "./Image";
import { Card } from "react-bootstrap";
import "bootstrap/dist/css/bootstrap.min.css";const firstName = "Youssef"; // Your name here, or leave as an empty string to test
function App() {
return (
{firstName ?Hello, {firstName}!
:Hello, there!
}
{firstName && }
);
}export default App;