hi-devs

Discover

Fresh questions, posts, and roles from the community—newest first.

Recent questions

View all
Hello World Hello World

Hello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello World

helloworld
SHshanto13 months ago
Props Not Updating in Child Component

Value prop updates but UI stays the same. ``` function Child({ value }) { const [localValue, setLocalValue] = useState(value); } ```

ReactHooksuseState
SHshanto13 months ago

Latest posts

View all
Blog
NodeJsExpressJsServer
Building a Basic API with Express

Node.js is widely used for creating APIs. Let’s build a minimal Express server. ``` const express = require("express"); const app = express(); app.get("/api/hello", (req, res) => { res.json({ message: "Hello from Node.js API" }); }); app.listen(3000, () => { console.log("Server running on port 3000"); }); ``` What this code does: - Creates an Express app - Defines a GET route - Sends a JSON response

HI

HI Shanto

3 months ago

0
Blog
NextJsAppRouter
Creating a Simple Page with File-Based Routing

One of Next.js’s best features is file-based routing. You don’t need to configure routes manually. Create a file called page.js inside the app directory: ``` export default function HomePage() { return ( <main> <h1>Welcome to Next.js</h1> <p>This page was created using file-based routing.</p> </main> ); } ``` Benefits: - [x] No routing configuration - [x] Cleaner project structure - [x] Faster development

HI

HI Shanto

3 months ago

0
Blog
ReactHooksuseState
Understanding useState with a Simple Counter

State is one of the core concepts in React. Without state, components would be static and unable to respond to user interactions. Let’s start with a simple counter example using the `useState` hook. ``` import { useState } from "react"; function Counter() { const [count, setCount] = useState(0); return ( <div> <p>Count: {count}</p> <button onClick={() => setCount(count + 1)}> Increment </button> </div> ); } export default Counter; ``` Here’s what’s happening: - [x] useState(0) initializes the state with a value of 0 - [x] count holds the current state - [x] setCount updates the state and triggers a re-render

HI

HI Shanto

3 months ago

3

Latest jobs

View all
Test job

Test compnay

Closed
HybridFull-time$222 - $444
ReactNodeNext
about 2 months agoView role