Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/morrismagic/react1


https://github.com/morrismagic/react1

Last synced: 1 day ago
JSON representation

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 {product.name};
}

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 && greeting}


);
}

export default App;