Open in app

Sign In

Write

Sign In

Harry Lau
Harry Lau

33 Followers

Home

About

Mar 22

Setting up React Native Mobile with React Native CLI in 2023

React Native CLI with MMKV, React Navigation, Reanimated and Gesture Handler — In this blog, installation of each library would be tested with opening the app in simulator to check that the installation works. Thus readers may refer directly to the package they would like to install. Why not Expo Go Expo Go is a really great tool and the expo router makes it even greater…

React Native

8 min read

Setting up React Native Mobile with React Native CLI in 2023
Setting up React Native Mobile with React Native CLI in 2023
React Native

8 min read


Mar 17

React Native — Reanimated

Animation library you need for mobile development in React Native — In this post, I would try to cover all concepts you need to know about Reanimated. This also serves as the note taking process as my learn the library. Concepts Problem of Builtin Animation of React Native As illustrated in the official documentation, JS code is executed asynchronously in React Native, such that UI changes upon user event…

React Native

5 min read

React Native — Reanimated
React Native — Reanimated
React Native

5 min read


Mar 17

Jotai V2 Notes 04 — Nested Data Structure

Ways to manipulate inner properties for atoms created with nested object — TLDR atom config can hold atom config(s) Jotai’s selectAtom splitAtom digs into atom with object and array respectively, but with mostly read-only functionality atomWithImmer withImmer useImmerAtom interacts with NON immer atoms to provide an immer version of write function, allowing writing directly at the inner object only, instead of copying from…

JavaScript

5 min read

Jotai V2 Notes 04 — Nested Data Structure
Jotai V2 Notes 04 — Nested Data Structure
JavaScript

5 min read


Mar 17

Jotai V2 Notes 03 — Async Atom

Async Atom — TLDR Async atom config can be instantiated with async read and/or write functions, or Directly instantiating with a Promise Passing Promise to write function of PrimitiveAtoms is the same with async atom with async write Async atom can be consumed with <Suspense> or loadable() Instantiation Async atom is instantiated simply by declaring…

React Native

4 min read

Jotai V2 Notes 03 — Async Atom
Jotai V2 Notes 03 — Async Atom
React Native

4 min read


Mar 17

Jotai V2 Notes 02 — Store & Provider

Store & Provider — Concept As stated in the last post, atom() function only creates a atom config. The instance of value is stored in the store of a Provider. When we didn’t specify any Provider, the app runs in Provider-less mode, i.e. there would be a default Provider behind the scene. There can be…

JavaScript

3 min read

Jotai V2 Notes 02 — Store & Provider
Jotai V2 Notes 02 — Store & Provider
JavaScript

3 min read


Mar 17

Jotai V2 Notes 01 — Basics

atom() useAtom() — TLDR Create atom config with atom() function Consume atom config in components with useAtom, useAtomValue, useSetAtom for read-write, readonly, and write only usage respectively. The initial value is stored in the store of the Provider (explained in next post) when the hook is called the first time. wrap atom() with useMemo…

JavaScript

3 min read

Jotai V2 01 — Basics
Jotai V2 01 — Basics
JavaScript

3 min read


Aug 4, 2022

Learning Rust Series Ch12 — Casting

as, from, into, try_from, try_into

Rust

1 min read

Learning Rust Series Ch12 — Casting
Learning Rust Series Ch12 — Casting
Rust

1 min read


Jul 31, 2022

Learning Rust Series Ch11 — Option & Result

Option A enum with Optional and None variant, which indicates may or may not have value (wrapped in Some). let x = Optional(3); let y = None match x { Some(p) => None => } Methods — basics // Boolean is_some is_none // Extraction expect // panic…

Rust

3 min read

Learning Rust Series Ch11 — Option & Result
Learning Rust Series Ch11 — Option & Result
Rust

3 min read


Jul 27, 2022

Learning Rust Series Ch10 — iterators and for

for is the last language semantics to be covered, which is syntatic sugar of iterator. Iterator pub trait Iterator { type Item; fn next(&mut self) -> Option<Self::Item>; // other stuff } // types implementing the iterator next function and specifying the Item type would get iterator functions automatically IntoIterator pub trait IntoIterator…

Rust

1 min read

Learning Rust Series Ch10 — iterators and for
Learning Rust Series Ch10 — iterators and for
Rust

1 min read


Jul 27, 2022

Learning Rust Series Ch9 — Closures

Closure as standalone vars let x = 3; let name = |params| {x} Notes: 1. params are in between || 2. x does not change in name thus is & let name2 = || x = 3; // &mut let name3 = || let y = x // Moved to y let y =…

Rust

1 min read

Learning Rust Series Ch9— Closures
Learning Rust Series Ch9— Closures
Rust

1 min read

Harry Lau

Harry Lau

33 Followers
Following
  • vechain

    vechain

  • DFINITY

    DFINITY

  • Dominic Williams

    Dominic Williams

  • VeChain X

    VeChain X

See all (18)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech