React

Special oddness with useState()/useEffect()

This is interesting/weird.  The following code does NOT work: const [refresh, setRefresh] = useState(10); useEffect(() => { setInterval(() => { console.log(“Timeout, refresh:”, refresh); setRefresh(refresh + 3); }, 1000); return list.unsubscribe; }, []); What happens is that each time the timer-interval goes off, the value of ‘refresh’ is still at 10. Why? The value goes to …

Special oddness with useState()/useEffect() Read More »

A different approach to data-sharing of server data/lists across components.

  I ran into a new challenge when I was refactoring and organizing code and components into smaller reusable pieces.  I ran into a case where HOC-like approaches wont work, but perhaps an Inheritance model will, and settled on a much different approach. Let’s discuss the use case.  Imagine your server holds a list of …

A different approach to data-sharing of server data/lists across components. Read More »

Some in-the-trenches tips/experiences with React/Jest (autotesting)

I love React, and mostly like Jest (and Jasmine and Java predecessors) but I will say: I spent a WAY MORE ENORMOUS time chasing simple debugging of jest scripts. Simple stuff. Why? I really dont know. It wasn’t designed for what I really want. It is designed for HUGE systems (like Citibank, Bank America, Amazon) …

Some in-the-trenches tips/experiences with React/Jest (autotesting) Read More »

Risk Management – Leverage Excel for fast, easily revised Risk Analysis

Product release to the customer often requires a FMECA (Failure Modes Effects and Criticality) along with the Reliability Prediction to complete the delivery package; in addition, revisions are common along with the pressure to update the Risk Analysis package quickly and accurately.  Excel provides data import, lookup, merge and formatting to automate this process and …

Risk Management – Leverage Excel for fast, easily revised Risk Analysis Read More »

Correctly using React this.state and truly being a state machine

We are all trained in React that NEVER EVER do this.setState() (or derivative) in your render() method, right? It is considered evil.  There is general fantasy that render() should be 100% benign, no side effects, 100% repeatable no matter how often re-called, right? There are two main reasons for this fantasy. One is some purist …

Correctly using React this.state and truly being a state machine Read More »

React Native, or PWA, or…? What do you think?

We all know, as we develop life-changing solutions for the world: “Mobile First” rules. Partly (if nothing else) is because: Responsive. Meaning, any-size screen, any rotation, and the “solution” needs to be very usable. Ok, got it, same page. Mobile is a bit different. Some apps are really mobile oriented, some are “game” (and def …

React Native, or PWA, or…? What do you think? Read More »

Can Redux and Angular REALLY be combined; yes!

It’s all about “state”. You will undoubtedly soon need to integrate #React into your #Angular apps (why? Because that’s the direction of the world –moving to #React). And it’s not easy.  Angular is an entirely different animal and both worlds want to be on-top or in-control.  Sure, any app (SPA or otherwise) can cross pages …

Can Redux and Angular REALLY be combined; yes! Read More »