Typeahead searchBox in ReactJs | Frontend Machine Coding Question | React Interview Questions

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 23

  • @eeshamkohli2367
    @eeshamkohli2367 10 месяцев назад

    bhai itni badhia video banai k k mai netflix ko chorh k tujhe binge watch kar raha hu :D

  • @ayushkushwaha171
    @ayushkushwaha171 Год назад

    Nice video, we could've added a "loading..." state as well to show up when there is no data and an API call is pending, like below:
    {data && data.length > 0 && listbox(data, activeIndex)}
    ---> {isLoading && Loading...}
    ---> {query && !isLoading && data && data.length === 0 && noResultMessage()}
    {error && errorMessage()}

  • @sumanthprabhu11
    @sumanthprabhu11 Год назад

    Thank you for making these videos. This really helps, and what stands out is your code is very professional and all other videos on RUclips looks like rookie level compared to yours.

  • @nallaparajuamareshvarma8471
    @nallaparajuamareshvarma8471 Год назад

    Great video Vedant, have been waiting for this from long time

  • @anandbaraik5010
    @anandbaraik5010 Год назад

    Thanks man, i appreciate your commitment to provide a better content 👏

  • @lokeshkhati8413
    @lokeshkhati8413 Год назад +1

    Thanks brother ❤, for creating such great content.

  • @prateekthakur3465
    @prateekthakur3465 4 месяца назад +1

    Since it is an interview, why not write the debouce function yourself ?

  • @nallaparajuamareshvarma8471
    @nallaparajuamareshvarma8471 Год назад +2

    Next video on Carousel please

  • @jagdishjena9058
    @jagdishjena9058 2 месяца назад

    Bhai espe video banana please Build a search bar with denouncing and throttling

  • @sumanthprabhu11
    @sumanthprabhu11 Год назад +2

    Hi
    I've not used the lodash debounce but I debounced it using setTimeout in the useEffect
    Is this fine?
    useEffect(() => {
    if (!query) {
    setData(null);
    setError(null);
    return;
    }
    const controller = new AbortController();
    const signal = controller.signal;
    const debounce = setTimeout(() => {
    fetchData(query, transformData, signal);
    }, debounceWait);
    return () => {
    clearTimeout(debounce);
    controller.abort();
    };
    }, [query, transformData, fetchData, debounceWait]);
    return [data, setData, error];
    };

    • @js_cafe
      @js_cafe  Год назад

      Hey, nope this won't be correct, If you are using debounce of your own then you have to write a polyfill for it. You can join us on discord and It is difficult for me to reply in comments
      discord.com/invite/YTZkV7By22

  • @kumarrishabh3587
    @kumarrishabh3587 4 месяца назад

    damn! why did i not discover your channel earlier

  • @gautammsuthar
    @gautammsuthar Год назад

    Thanks for the effort boss💙💙🙌🙌

  • @salauddin3693
    @salauddin3693 Год назад

    i did not understand where did write Abortcontroller code?

  • @anchalraj3285
    @anchalraj3285 5 месяцев назад

    where is the github link of this project bro?

  • @santoshmore2953
    @santoshmore2953 Год назад

    How much time do company provide us to solve this problem in real interview?

  • @akashpatil9043
    @akashpatil9043 Год назад

    Is this machine coding round ask in every company? Bhai

  • @vatansrivastava7279
    @vatansrivastava7279 Год назад

    Hey where can i find these questions for interview preperation ?

  • @roopchandjangir6862
    @roopchandjangir6862 10 месяцев назад

    bhai sab ko searchbox component me as a prop kyu pas karte he, direct search box me hi use kyu nhi karte

    • @js_cafe
      @js_cafe  10 месяцев назад +1

      To make search box customisable

    • @roopchandjangir6862
      @roopchandjangir6862 10 месяцев назад

      So basically we need to pas props from parent as standard technique

    • @js_cafe
      @js_cafe  10 месяцев назад

      There are other ways also, like composition