Detect NodeJS if called using import or directly
programming typescript , javascriptHow can I detect if my NodeJS file is called using node file path node path-to-file or requirepath-to-file or import path-to-file ?
List loaded posts in HexoJS
programming typescript , javascriptList loaded posts in HexoJS Basic codes to list loaded hexo posts by default to list all posts you can using below codes: Fix missing description by default hexo not provide property description, you
Boostrap 5 Color Theme Switcher
programming javascript , css , htmlColor mode toggler for Bootstrap 5.3.0
How to create dynamic toast with flowbite-react
programming typescript , javascriptHow to create dynamic toast with flowbite-react In this article you will learn of How to create toast with flowbite-react dynamically, see below screenshoots. Below is an example of how you can create
How to render single post hexo
programming typescript , javascript , hexoexample javascript codes to render single markdown post with HexoJS
ReactJS isMounted hook with useEffect
programming javascript , reactReactJS isMounted hook with useEffect Basic errors Warning: Cant perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. Basic Reac
react-dom server generate static html from react elements
programming typescript , javascript , reactreact-dom server generate static html from react elements import as fs from fs;import prettier from prettier;import React from react;import ReactDOMServer from react-dom/server;render;function render
How to use react suite toaster in reactjs
programming typescript , javascript , reactHow to use react suite toaster in reactjs React Hook useToaster cannot be called in a class component You cannot using useToaster in class component, use rsuite.toaster instead. useToaster rsuite.toas