React hooks and “setInterval”

If you've ever come across having to use setInterval within react hooks you probably hit a wall where the component just doesn't act as it should... For example, we might naively code something like this: import React, { useState } from "react"; import "./styles.css"; export default function App() { const [counter, changeCounter] = useState(0); setInterval(() … Continue reading React hooks and “setInterval”

Advertisement

Practical use case for Javascript Function Properties (ReactJS)

TL;DR : Function properties are useful when meta-programming, specifically avoiding minification and mangling of function names The new UI for CyberSift consists of a number of "widgets" which are interchangeable and can be moved around the screen to cater for a user's preferred layout. Heavily inspired by Elastic's Kibana, you can see the end result … Continue reading Practical use case for Javascript Function Properties (ReactJS)