(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
const AWS = require('aws-sdk'); | |
const client = new AWS.SecretsManager({}); | |
// Call the AWS API and return a Promise | |
function getAwsSecret(secretName) { | |
return client.getSecretValue({ SecretId: secretName }).promise(); | |
} | |
// Create a async function to use the Promise |
import { useRef, useCallback, useEffect, useState } from 'react'; | |
import { ResizeObserver as ResizeObserverPolyfill } from '@juggle/resize-observer'; | |
const ResizeObserver = window.ResizeObserver || ResizeObserverPolyfill; | |
export default function useResizeObserver() { | |
const [size, setSize] = useState({ width: 0, height: 0 }); | |
const resizeObserver = useRef(null); | |
const onResize = useCallback(entries => { |