SPSanthosh Pinsannyblog.hashnode.dev·Apr 4, 2021 · 1 min readJavaScript Objects Part 5: Object Duplication00
SPSanthosh Pinsannyblog.hashnode.dev·Oct 24, 2020 · 2 min readUseRef Hooksimport React, { useRef } from "react"; const CustomTextInput = () => { const textInput = useRef(); focusTextInput = () => textInput.current.focus(); return ( <> <input type="text" ref={textInput} /> <button onClick={focusText...00
SPSanthosh Pinsannyblog.hashnode.dev·Oct 24, 2020 · 4 min readReact UseEffect HooksUseEffect with infinite loop fix export default function DataLoader() { const [data, setData] = useState([]); useEffect(() => { fetch("http://localhost:3001/links/") .then(response => response.json()) .then(data => setData(data)...00
SPSanthosh Pinsannyblog.hashnode.dev·Oct 24, 2020 · 1 min readNamed Export vs Default Export Syntax in ES6Named Export // imports // ex. importing a single named export import { MyComponent } from "./MyComponent"; // ex. importing multiple named exports import { MyComponent, MyComponent2 } from "./MyComponent"; // ex. giving a named import a different na...00