Solidity Snippets

First of all, we need to declare which version of Solidity the compiler should use at the top of the contract: afterwards we can start writing our first contract like this: Basic value types: Here are some data types available in Solidity. When they are used as function arguments or variable assignments, their values are …

Redux Cycle

Action Creator (User)-> Action(Form) -> dispatch(Form handler) -> Reducers(Departments) -> State(Compiled shared department data) Analogy, Insurance Company: policy: Customer holds a policy, if bad stuff happens to them then we pay them claim: Customer had something bad happen to them, we need to pay them. Customer signs up for a Policy -> Form -> Form …

Custom Hooks

Custom hooks are a great way to avoid repeating yourself while writing code. Custom hooks will always use a primitive React hook. Its not for JSX. Each hook should have only one purpose, such as data-fetching from a specific api. Steps to take when creating reusable hooks Identify each line of code related to some …