Home » Blog

Blog

Prevent React applications from 404 errors when refreshing the page on inner URLs

This code is an Apache web server configuration file written in Apache’s mod_rewrite syntax. It’s commonly used in React applications to prevent 404 errors when refreshing the page on inner URLs. In summary, this code tells Apache to rewrite all requests that aren’t for an existing file, directory or symbolic link to the “/index.html” file. …

Prevent React applications from 404 errors when refreshing the page on inner URLs Read More »

Create a template using React router and SASS

Here is an example of the full code for each of the files described above: src/Routes.js src/App.js src/Home.js src/About.js src/Contact.js src/sass/main.scss Please note that this is a basic example and you may want to add more functionality and styles to your components as needed. Also, Make sure that you’ve installed the necessary packages react-router-dom and …

Create a template using React router and SASS Read More »

Is using includes() faster than do-while when iterating trhough an array in Javascript?

When iterating through an array in JavaScript, the fastest method will depend on the specific use case and the size of the array. In general, if you are looking for a specific element in an array and you want to know if the element exists in the array, the Array.prototype.includes() method will be faster than …

Is using includes() faster than do-while when iterating trhough an array in Javascript? Read More »

Scroll to Top