Tricky Code
20 subscribers
3 photos
1 video
5 links
Here you will find a code tricks and complicated solutions
Download Telegram
Channel created
Channel photo updated
Channel name was changed to «Tricky Code»
#reactnative

Fast way to clean a cache in your react-native project

update your package.json
Add new script:

"reinstall": "rm -rf ./package-lock.json ./yarn.lock ./node_modules ./ios/Podfile.lock ios/Pods ./android/.gradle ./android/.idea ./android/build ./android/app/build ~/.gradle && npm i && npx pod-install"
🔥9👍4
This media is not supported in your browser
VIEW IN TELEGRAM
Still don't understand how EventLoop works in JavaScript?

Check EventLoop - Playground to get a visuality
shorturl.at/hCHT3
How to make your own AudioPlayer by using React, Web api - AudioContext, D3.js

https://itsitdude.medium.com/mini-web-audioplayer-with-visualisation-part-d3728e674658
How to get a difference between two dates

function dateDiff(date1, date2) {
const datesDiff = Math.abs(date1 - date2);

return {
hrs: parseInt(datesDiff / (1000 * 60 * 60) % 24),
min: parseInt(datesDiff / (1000 * 60) % 60),
sec: parseInt(datesDiff / (1000) % 60)
};
}
How to check network status in web browser by using javascript

window.addEventListener("online", (connection) => {
console.log("You are online back !!", connection);
});

window.addEventListener("offline", (connection) => {
console.log("Lost Network Connection !!", connection);
});