Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
67
Comments
10

Azzy dvyastia kesuma

@azzykesumaIndonesia1,425 points

Currently working as a Software Developer

I’m currently learning...

React Native

Latest solutions

  • Advice generator FM

    #tanstack-query#typescript#vite#react

    Azzy dvyastia kesuma•1,425
    Submitted 4 months ago

    i have invalidated the query when clicking the button to generate a new advice, but whenever i clicked the button too fast, the returned result from the api always seems to be cached, therefore not changing the advice.

    export const useApiQuery = (
    queryKey: [string, unknown?],
        enabled: boolean,
      ) => {
        return useQuery({
          queryKey,
          queryFn: async () => {
            const response = await fetchAdvice();
            return response
          },
          enabled,
          retry: 0,
          refetchOnWindowFocus: false,
          staleTime: 0,
        });
      };
    

    tried setting the staletime to 0 but the cache still persist. the network tab show that the browser tries to refetch the api, but it doesn't invalidate the cache inside the disk-cache, so how do i invalidate the cache on demand regardless of what tools i'm using?


    0 comments
  • Product list challenge

    #shadcn#tailwind-css#typescript#vite#framer-motion

    Azzy dvyastia kesuma•1,425
    Submitted 4 months ago

    i'm using vite as react-wrapper/compiler for most of my project, and when i'm previewing all of my static assets (prod) , all of them usually broken unless i put it in root public, why is this always be the case?


    1 comment
  • form challenge

    #react#shadcn#typescript#vite#framer-motion

    Azzy dvyastia kesuma•1,425
    Submitted 4 months ago

    i think i should be creating my own toast instead of using library made toast like shadcn


    0 comments
  • Ticket challenge

    #react#typescript#vite#framer-motion

    Azzy dvyastia kesuma•1,425
    Submitted 4 months ago

    1 comment
  • multi step form challenge

    #framer-motion#redux#tailwind-css#typescript#vite

    Azzy dvyastia kesuma•1,425
    Submitted 11 months ago

    any feedback is greatly appreciated


    0 comments
  • rock paper scissor challenge

    #framer-motion#react#tailwind-css#vite#typescript

    Azzy dvyastia kesuma•1,425
    Submitted 11 months ago

    i use a lot of values inside the useContext, which works, but i feel it made my context bloated. i can split the values into multiple context, but i fear that it will make my main.tsx into context wrapper hell, and i also try to avoid using over complicated state management like redux for this simple project. how can i simplify the context without sacrificing code readability?


    0 comments
View more solutions

Latest comments

  • Hale•330
    @halelite
    Submitted 11 months ago
    What specific areas of your project would you like help with?

    Any feedback would be appreciated.

    Responsive URL shortening API using React

    #fetch#react
    1
    Azzy dvyastia kesuma•1,425
    @azzykesuma
    Posted 11 months ago

    congratulations on finishing the project, well done!, maybe i can try giving some comments that may help you in the next project

    • try mobile first approach when implementing fm challenge , meaning that instead of using max-width for a baseline for responsive, try using min-width, that way you can structure your code better, as you have a mental image for various breakpoints like @media screen and (min-width: 768px) is designed for tablet screen and above, whereas below it, it targets the mobile screen. using tailwind will make this whole process easier ,as you just need to specify the base class and the breakpoints example <div className='flex flex-col md:flex-row'>...</div> will make your div has a flex col on mobile to tablet, and row on desktop.
    • i think you need to check this block of code
            window.addEventListener('resize', () => {
                if(window.innerWidth <= 376) {
                    setIsMobile(true);
                } else {
                    setIsMobile(false);
                }
            })
        });
    
        useEffect(() => {
            if(isMobile) {
                if(menuActive) {
                    ref.current.style.display = 'flex';
                } else {
                    ref.current.style.display = 'none';
                }
            } else {
                ref.current.style.display = 'flex';
            }
        }, [menuActive]);
    

    this code make it so that, when i first resize the screen to mobile size, it automatically open the navs. i think instead of dynamically display or hide the mobile navs, instead you can modify the button to open and close the mobile menu. that way, you don't have to check whether the menu is active or not.

    keep on coding!

    Marked as helpful
  • Ally Glenday•20
    @ally-glenday
    Submitted over 1 year ago

    Newsletter Signup

    #accessibility
    2
    Azzy dvyastia kesuma•1,425
    @azzykesuma
    Posted over 1 year ago

    congratulations on completing the challenge! you can use localstorage to set the email for the purpose of this challenge https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage then, get the localstorage value, and inject it into DOM

    but in the real job scenario, i think you need to store it in some sort of database

    Marked as helpful
  • Aaron Ramirez•140
    @davuboy
    Submitted about 2 years ago

    QR code component

    3
    Azzy dvyastia kesuma•1,425
    @azzykesuma
    Posted about 2 years ago

    congratulations on finishing the challenge! some friendly advice

    • on mobile screen (360px) , the main and main-container class is overflowing, i believe it's caused by the fixed with of 450px you set on the main tag. I would recommend setting the lower width, or not setting the width at all at this screen size as it will overflow.
    • you can scale down the image qr by adding some additional div to contain the width of the image and give padding to said div, or you can set the width manually.
  • slothXgod•10
    @slothXgod
    Submitted about 2 years ago

    Qr code component

    3
    Azzy dvyastia kesuma•1,425
    @azzykesuma
    Posted about 2 years ago

    i don't think it's cheating nor it's a bad idea at all with the rise of tools that could help us code like chatgpt, github copilot, it's actually very hard not to try those tools in real life working scenario, as long as you could solve the issue you are facing in your code, and could satisfy the client requirements, that's is a job well done, regardless of what tools you are using

    Marked as helpful
  • Atthawut Smith•100
    @zachtix
    Submitted about 2 years ago

    qr-code-component

    1
    Azzy dvyastia kesuma•1,425
    @azzykesuma
    Posted about 2 years ago

    congratulation on finishing the project! some friendly feedback for you

    • if you want to make the card centered vertically and horizontally, setting flex to a body and justify-content and align-items center might be the way, although you need to be careful implementing this when you have multiple items inside the body and they will be all centered.
    • the p tag is somewhat hard to see (having low contrast level), maybe you can change the color to other darker color so that it can be displayed nicely

    overall, well done on completing the project!

    Marked as helpful
  • Priscilla Ilha Carbonell•20
    @Pricbnll
    Submitted about 2 years ago

    Result and Summary Component

    2
    Azzy dvyastia kesuma•1,425
    @azzykesuma
    Posted about 2 years ago

    about flex and grid, it depends on the scenario. usually i use flex if the layout is rather simple and don't need tweaking about the exact width of each flex item, you can use that using flex basis but i didn't really like it. as for grid, you can use it on the components that require each grid item to have specific width, the exact example is header nav , where usually there is logo, nav links and icons.

    Marked as helpful
View more comments
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub