This project is my REACTION to the video
APP.js --> index.js --> Main --> Header, NFTDisplay, Hero
- β
The useEffect Hook allows you to perform side effects in your components.
Some examples of side effects are: fetching data, directly updating the DOM, and timers.
Example:
useEffect(() => {
const connection = createConnection(serverUrl, roomId);
connection.connect();
return () => {
connection.disconnect();
};
}, [serverUrl, roomId]); // conditions meet
without conditions
it will run every time it's render
Replace class, componentDidMount, componentDidUpdate
- β
The React useState Hook allows us to track state in a function component.
State generally refers to data or properties that need to be tracking in an application.
Example:
const [brand, setBrand] = useState("Ford"); // const brand = "Ford" intial value
const [model, setModel] = useState("Mustang");
const [me, setMe] = useState(); // meaning me-variable has nil value
https://www.w3schools.com/react/react_usestate.asp π
include 2 files: 0.jpg, 0.json
The json file is where you define NFT's properties: hat, ears, eyes (blue)
We do not save the raw/origin png to Solana chain, we use a 3rd party (candy machine) for hosting assets and keep the id (reference keys) in blockchain
With this powerful tool, you can guard your NFT
Example: Add start/end date, bot tax ...
π Remember to change the wallet payment with your address.
https://docs.metaplex.com/developer-tools/sugar/guides/sugar-for-cmv3#bot-tax
π For me, no RUST code actually typing is amazing.
Going fullstack mode, take advantage of those libs around you.
P/s: NFT properties are so kool π€
This repo was developed by @lamha. Follow or connect with me on my LinkedIn.