Skip to content

Instantly share code, notes, and snippets.

View frankMagoba's full-sized avatar
💭
I may be slow to respond.

Franklin Magoba frankMagoba

💭
I may be slow to respond.
View GitHub Profile
@frankMagoba
frankMagoba / trouble_shoot_cd
Created April 20, 2023 05:32
Resolving circular dependencies
Circular dependencies occur when two or more components depend on each other in a way that creates a loop. This can lead to errors and unpredictable behavior, making it important to manage these dependencies carefully in React. Here are some tips for managing circular dependencies:
Identify the source of the circular dependency: The first step in managing circular dependencies is to identify the root cause. Look for components that depend on each other and try to find the source of the loop.
Refactor code to reduce dependencies: Once you have identified the components involved in the circular dependency, try to reduce the number of dependencies between them. One way to do this is by extracting common functionality into a separate component and having the other components depend on it instead of each other.
Use lazy loading and dynamic imports: Another way to reduce circular dependencies is by using lazy loading and dynamic imports. This can help to break up the dependencies between components a
@frankMagoba
frankMagoba / recursion.ts
Created September 21, 2021 10:21
Form Interview
type Tree = Record<string, number | Tree>;
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>pdf-html</title>
<meta name="generator" content="BCL easyConverter SDK 5.0.252" />
<meta name="author" content="BluRoq" />
<meta name="title" content="BR Debt_Card" />
<style type="text/css">
body {
@frankMagoba
frankMagoba / dart
Created December 13, 2020 09:57
textfield deco
decoration: new InputDecoration(
focusedBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(7)),
borderSide:
BorderSide(color: Colors.grey, width: 1.0),
),
enabledBorder: const OutlineInputBorder(
borderRadius: const BorderRadius.all(
const Radius.circular(7.0)),