Exercise - Extend your Coin Exchange with more functionality

great for finsihing the course. I would suggets one thing if you want to take yuor react lesrning to the next level. You should look into functional components and react hooks if your intrested on learning react further on your own from here. big congratulations though for finishing the exchange. React is an amazing tool to have

1 Like

Thanks for the kind words and advice @mcgrane5

Hope your learning is going well!

1 Like

added buy and sell added twitter and helicopter buttons used react router to display the tweets on different page added different styling.
https://codesandbox.io/s/rough-sky-y4fsf5?file=/src/App.js

2 Likes

niceeee. good to see your using functional components too

1 Like
This updates the state witnout calling setcoinData(), and it shouldn't
const airdropMoney = () => {
    console.log("airdrop request");
    setbalance(balance + 1000);
    let x = [...coinData];

    x = x.map((coins) => {
      coins.balance += 1;
    });
  };

https://os0xi.github.io/coin-exchange/

https://github.com/os0xi/coin-exchange

1 Like

I used your code to fix my own buy and sell function, thank you.

2 Likes

While uploading my react project to Netfily, in the deployment log it says this:
Module not found: Error: Can’t resolve ‘…/Coin/Coin.jsx’ in ‘/opt/build/repo/src/components/CoinList’
Thanks, Michael …

1 Like

How do you get Twitter search results? Is there a hook for it or an API?

1 Like

if you want to find an api endpoint like this you can go directly to twitter and open the networks tab in the dev tools and look for all of the request being made by the webpage. if there is an endpoint for stwitter search results it will appear here

1 Like

I ended up using the CoinGecko API to get more data.
Coinpaprika seems limited.

Added a popup info window for each crypto asset with some extra data.
Added some styling, rank, logos, add and sell buttons etc…

I’ll probably add more on to this over time and repost in here with a future update.

https://ciphergrind.github.io/coin-exchange-3/

https://github.com/CipherGrind/coin-exchange-3


2 Likes

noiceeee. yeah coingecko is far better, especially with their V3 api. the only criticsm i will give it is that it always rounds the BTC price to the nearest whole number which can be annoying IMO

2 Likes

True, I didn’t notice that until you mentioned it. Thanks for the heads up!

2 Likes

https://coin-exchange-two.vercel.app/

3 Likes

niceeeee. great job on the tweets from ethereum section. this is really cool. hats off to you

3 Likes

https://lordship123.github.io/coin_exchange/

2 Likes

That one was nice. :slight_smile:

here is mine: https://jplaclau.github.io/react-web-development-101v2/

Hello everybody, hello master @zsolt-nagy.

There goes my app:

And the its code content:

I didn’t add all these features, but I think it became pretty cool. I didn’t copy anyone’s code, it was really a challenge, but I’m happy with the result.

Thanks for everything.

I’ll be happy also with any anyone’s feedback as well.

1 Like

I deployed a re-styled coin-exchange to github pages:

https://codinginlondon.github.io/moralisacademy-react/

Github repo:
https://github.com/CodingInLondon/moralisacademy-react/tree/a49737b9d3b81fe5e6aeeca7d045e08081e308d2

As a further exercise, I intend to put together a simple UX for a Bitcoin treasury management product (mellona.io). I’ll post it here once I have something running.

It’s been a useful course, thanks Zsolt!

Matt