« first day (4124 days earlier)      last day (816 days later) » 

1:28 PM
Hello
  const handleSearchSubmit = (event) => {
    const searchCondition =
      search.inputValue.trim(" ").length >= 3 && event.key === "Enter";

    if (searchCondition) {
      navigate({
        pathname: "products",
        search: `?q=${search.inputValue}`,
      });
    }
  };

  useEffect(() => {
    const API_URL = "https://jsonplaceholder.typicode.com/posts";

    async () => {
      try {
        setSearch({ ...search, loading: true });
        const response = await fetch(API_URL);

        if (!response.ok) {
but I am getting this warning in console
React Hook useEffect has a missing dependency: 'search'. Either include it or remove the dependency array. You can also do a functional update 'setSearch(s => ...)' if you only need 'search' in the 'setSearch' call
  const [search, setSearch] = useState({
    loading: false,
    inputValue: "",
    products: [],
  });
I just want to trigger useEffect when user submit search with Enter (keyboard)
 
1:55 PM
Does anyone know if there's a node module for creating bootstrap elements on the backend for serving to the renderer?
 
@Tacoタコス Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
 
9 hours later…
10:34 PM
Hello
 

« first day (4124 days earlier)      last day (816 days later) »