Category: Uncategorized

  • React TS setInterval state is not updated in the callback FIX

    You can encounter some issues when trying to create a Interval, for example every 10 seconds check if the user made some changes.The problem could be, that you can not allways get the current state from within the callback.this is because React saves new value to the setState when it is updated and does not…

  • React TS createContext()

    Using context in your react app is really useful, when you are passing some prop to multiple nested elements for example Theme How to use it? In this example we will make Theme provider. Create ThemeProvider.tsx It will hold our wrapper that implements the theme for all child components. Then make Class or functional component…

  • React TS useRef() hook

    This hook is useful when we are trying to read some input field or when we just need the reference to the element for getting size or other properties. How to use it? imagine we are trying to make a tooltip under some element when user hovers over it and now we can use it…

  • Mastering Custom Flutter Widgets: A Step-by-Step Guide

    Why Custom Widgets? Step 1: Planning and designing Begin with vision of the custom widget. In this case, we want to create a card widget that can display an image, a headline, and some text. Think about the design in figma or just in your head, define how it should display with different screeen sizes,…

  • React Formic vs. Use-Form

    Handling react forms efficiently is a crucial task. Two popular libraries that simplify form management are Formik and react-hook-form (often referred to as use-form). Formik: Pros: Cons: react-hook-form (use-form): Pros: Cons: If you value a comprehensive solution with a large community and don’t mind a steeper learning curve, Formik might be the right choice. On…

  • Freezed+json_serializable Package

    What can Freezed+json_serializable packages do for you? Setup 1. Import dependencies Pubspec.yaml should look like this 2. Exclude generated files from analysis 3. Watch with build runner This will start watching your code and as long as the terminal session is opened it will generate the code upon our changes 4. Create class with model…

  • Powerful Flutter packages

    What are flutter packages? Flutter packages are useful pre-made bundles of code that make it easy to add features and functionality to your Flutter app without starting from scratch. Let’s explore some of them and how they can supercharge your app development. Packages I Love 1. flutter_login Simplifies the implementation of user authentication and login…

  • Statefull vs Stateless Flutter widget

    Stateless Ideal for: Static content that doesn’t change over time, such as labels, icons, or static images Pros: Cons: StateFull Ideal for: Dynamic content that needs to change or respond to user interactions, such as forms, counters, or lists Pros: Cons:

  • Flutter_riverpod package

    I am writing this post, because I belive it is important to have some solid tutorial that explains something little simpler than the rest. I learned the things that i know from reso coder and other youtube tutorials What is Riverpod? Riverpod is a state management solution for flutter/dart. It is scalable and if you…