TDthilina dilshaninthilina.hashnode.dev·Feb 16, 2022 · 1 min readReact Contextimport { createContext, useState, useEffect } from 'react'; const NotificationContext = createContext({ notification: null, // { title, message, status } showNotification: function (notificationData) {}, hideNotification: function () {}, }); ...00
TDthilina dilshaninthilina.hashnode.dev·Jan 3, 2022 · 1 min readRedis local url"redis://127.0.0.1:6379"00
TDthilina dilshaninthilina.hashnode.dev·Dec 10, 2021 · 1 min readScroll to bottomdocument .getElementById("scrollTo") .scrollIntoView({ behavior: "smooth", block: "start" });00
TDthilina dilshaninthilina.hashnode.dev·Oct 3, 2021 · 1 min readSound from browserconst speak = (msg) => { const sp = new SpeechSynthesisUtterance(msg); [sp.voice] = speechSynthesis.getVoices(); speechSynthesis.speak(sp); }; speak("Hellow world");00