HaLamUs / nft-drop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nft-drop

Intro

This project is my REACTION to the video

IMAGE ALT TEXT

Detail

React/Next.js

APP.js --> index.js --> Main --> Header, NFTDisplay, Hero

React Hook

  • βœ… 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 πŸ‘†

Solana

  1. IDE https://beta.solpg.io
  2. Libs https://www.metaplex.com

NFT

include 2 files: 0.jpg, 0.json
The json file is where you define NFT's properties: hat, ears, eyes (blue)

https://opensea.io/assets/solana/214gAnKQUfFoD6AW4aRtETJNA73WZ3mYUybMEp3PDqHy πŸ‘†

How are NFTs stored?

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

Sugar candy

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

The END

😌 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 🀘

Author

This repo was developed by @lamha. Follow or connect with me on my LinkedIn.

License

MIT licensed.

About

License:MIT License