Skip to content

Instantly share code, notes, and snippets.

View rashidalmarri-dev's full-sized avatar

Rashid Al-Marri rashidalmarri-dev

View GitHub Profile
@rashidalmarri-dev
rashidalmarri-dev / useReducer.jsx
Created February 6, 2026 18:30
With useReducer instead of useState
import * as React from "react";
const initialState = {
step: 1,
formData: {
name: "",
email: "",
address: "",
city: "",
zipcode: ""
@rashidalmarri-dev
rashidalmarri-dev / useState.jsx
Created February 6, 2026 18:32
using useState instead of useReducer
import * as React from "react";
const initialFormData = {
name: "",
email: "",
address: "",
city: "",
zipcode: ""
};