This is a simple pattern that will provide react hook and react higher component to get the state from redux and register the actions. First create a ts file with an initial state, reducers, and saga effects: In the above code, the namespace must be the first part of the type in effects and reducers […]
Posts by :
Using the content-disposition header property, we can tell the browser if to download or to show image in browser: “content-disposition: attachment” will download the file while “content-disposition: inline” will display the file in the browser if supported.
Right now creat-react-app supports SASS by default. So to add less support we need to eject first and then edit “webpack.config.js” file. To eject configuration run following command: And install less loader and less Now search following: And replace with Now we need to replace SASS loader with less loader. Find the following lines: in […]
A new version of aria2 is now available and I have created the rpm for this version too. It was compiled on centos7. Download link for aria2 1.35.0 rpm is given below: https://www.dropbox.com/s/5qveuq0i3nj4bf1/aria2-1.35.0-0.x86_64.rpm?dl=0 gpgcheck have to be turned off because rpm is not signed. Run following command to install aria2 : Install the rpm using: […]
Means any (.tsx) file in your src folder (its sub-folders) cannot be blank or cannot just have simple functions without any export statement.
Fixing the “cannot GET /URL” error on refresh with React Router and Reach Router (Tested On Apache and IIS)
We expect that on reload the single page apps such as React apps go to the URL that is in the browser but instead a 404 error occurs. Because the browser requests server in case of refresh but in case your app is loaded your app just changes the URL but does not reload the […]
The Microsoft URL for all the steps is: Here. Follow only those steps which you need. If there is any confusion comment on that page or below. (This suggestion is for only newbies.) Backup Of Above Article is: Here Download the target dotnet core runtime from : Here . After selecting the dotnet core version, […]
Below is the line that have to be put in <VirtualHost *:443> where ‘*’ can be remained as it is or can be changed if you know what you are doing. Do not put below in HTTP virtual host block i.e. <VirtualHost *:80> (port and ‘*'(IP) can be anything if you have configured your server […]
useState() : Takes One argument – the initial value of variable Uses Array destructuring feature. e.g. := const [variableName, functionName] = useState(value) Where : variableName : that will be stored in state functionName: The that will be used to set the value of variableName value : the initial value of variable variableName useEffect() : The […]