From React Hooks in Action by John Larsen
Some of our React components are super-friendly, reaching out to say “hi” to APIs and services outside of React. Although they’re eternally optimistic and like to think the best of all those they meet, there are some safeguards to be followed. In this article, we’ll look at setting up side effects in ways that won’t get out of hand. In particular, we’ll explore these four scenarios:
§ Running side effects after every render
§ Running an effect only when a component mounts
§ Cleaning up side effects by returning a function
§ Controlling when an effect runs by specifying dependencies
To focus on the API we’ll create some easy component examples. First up, let’s say “Bonjour, les side-effects.”
From Grokking Artificial Intelligence Algorithms by Rishal Hurbans
What you’ll learn in this article:
§ The lifecycle of a genetic algorithm.
§ Designing and developing a genetic algorithm to solve problems.
§ The parameters for configuring a genetic algorithm lifecycle based on different scenarios, problems, and data sets.