Sunday, April 23, 2023

Passive income from the computer

Rent out your unused bandwidth as a proxy. Check if your ISP allows it.

https://www.honeygain.com/

https://packetstream.io/

Packity


https://www.loadteam.com/ : Run jobs on your computer

https://www.kryptex.com/en/ : Mine cryptocurrency & get paid


Sunday, April 2, 2023

React hooks overview

React hooks overview.

  • useState: set initial state directly. Or use a function to set the initial state to avoid calls on every re-render. Functions calling state should get the previous state & then update.
  • useEffect: used for side effects like invoking APIs. Add a return function to be called to cleanup, such as removing an event listener.
  • useMemo: Use to memoize. Such as for a slow function. Stores a previous value. Can also be used to compare objects (referential 'equality'), and avoid unnecessary updates.
  • useRef: Can refer to components. Normally, use state instead to handle updates. Use only if you have to. Can also be used to store values without causing re-renders (but using state can cause re-renders).
  • useContext: Store data that can passed between components without needing to pass down the props in a hierarchy.
  • useReducer: Use dispatch to write cleaner code & passing down fewer event handlers.
  • useCallback: Use to memoize function.
References:

Free AI Chat tools

https://grok.com https://x.com/i/grok https://chatgpt.com https://copilot.microsoft.com https://chat.deepseek.com https://www.meta.ai https:...