🚀 Just built a full-featured paper trading app from scratch Trade No real money. No API keys. Just clean React code and simulated live markets. What it does: 📈 Live price ticks every 3 seconds across 15 stocks (AAPL, TSLA, NVDA, META and more) 📊 Market & limit orders — limit orders auto-fill when the price crosses your target 🔔 Price alerts with audio chimes when a stock hits your price 📉 Portfolio analytics — sector pie chart, unrealized P&L, top/worst performer 🌙 Light/dark theme toggle + full keyboard shortcuts 📱 Fully responsive — sidebar on desktop, bottom nav on mobile Tech stack: ⚛️ React 19 + Vite 📊 Recharts for all charts and sparklines 🔊 Web Audio API for alert sounds (no external libraries) 💾 localStorage for persistence — no backend needed Some highlights I'm proud of: → Limit order engine that runs on every price tick using refs to avoid stale closures → Price alert system with a two-tone chime using the Web Audio API → Mini sparklines inline in every watchlist row showing 30-day trend → Onboarding screen that only shows once, then never again Built this to practice building something that feels real the kind of app where the UI reacts instantly, animations are smooth, and every interaction has feedback. 🔗 Live demo: https://lnkd.in/gM48pZsA What would you add next? Drop it in the comments 👇 #React #WebDevelopment #JavaScript #Frontend #OpenSource #BuildInPublic
Building a Full-Featured Paper Trading App with React
More Relevant Posts
-
I got tired of rewriting the same scroll logic… so I built a reusable React hook 👇 In one of my projects, I had multiple places where I needed: → Detect when a user is near the bottom → Trigger API calls (pagination / infinite scroll) → Handle different containers (not just window scroll) Initially, I was repeating this logic everywhere. So I extracted it into a custom hook: 👉 useTableScrollPagination What it does: • Works with both containers and tables (AG Grid in my case) • Lets me control when to trigger (75%, 90%, etc.) • Prevents duplicate API calls while loading • Keeps scroll position intact after data updates The biggest win? 👉 I no longer think about scroll logic — I just reuse it. I know there are libraries for infinite scroll, but in real-world apps: → Custom containers → Complex UI structures → Different trigger behaviors …often need a more flexible approach. Curious — how are you handling infinite scroll in your apps? Library or custom solution? #ReactJS #FrontendDevelopment #TypeScript #DeveloperExperience
To view or add a comment, sign in
-
-
🪝: Our app was slow. Users were complaining. Here's the 5 things that fixed it (and the 1 thing that almost made it worse). Performance optimisation is one of those things that sounds abstract until you have actual users complaining. Here's what I've done in real projects that actually moved the needle: 1. CODE SPLITTING with React.lazy() → Don't load the whole app on first visit → Lazy load routes and heavy components → Real impact: cut initial load time by ~40% on a large project 2. MEMOISATION — but only where it matters → React.memo() for components that receive the same props often → useMemo() for expensive calculations → useCallback() for functions passed as props → WARNING: Over-memoising adds overhead. Profile first, optimise second. 3. OPTIMISED RENDER CYCLES → Identify what's causing unnecessary re-renders (React DevTools Profiler is your best friend) → Move state as close to where it's used as possible → Avoid storing derived data in state — calculate it 4. IMAGE OPTIMISATION → Lazy load images below the fold → Use appropriate formats (WebP where possible) → Set explicit width/height to avoid layout shifts 5. BUNDLE ANALYSIS → Use webpack-bundle-analyzer or Vite's rollup-plugin-visualizer → You'll be shocked what's in your bundle sometimes The thing that almost made it worse? Premature memoisation everywhere. We wrapped every component in React.memo before profiling. It actually slowed things down. MEASURE. THEN OPTIMISE. What's your go-to performance trick? #ReactJS #PerformanceOptimisation #FrontendDev #JavaScript #WebPerformance #CodeSplitting #ReactHooks
To view or add a comment, sign in
-
🚀 Just wrapped up a deep dive into frontend performance optimization on my latest full-stack weather app, SkyCast! 🌩️ While building features is fun, turning a good app into a blazing-fast one is entirely different. I spent the day tracking down bottlenecks, eliminating render-blocking resources, and squeezing out every millisecond of performance. Here is what I implemented to make the speed difference night and day under Codveda Technologies: ⚡ Module Preloading: Eliminated render-blocking barriers by introducing <link rel="modulepreload"> tags, instructing the browser to aggressively fetch JavaScript bundles parallel to the HTML parsing. 📦 Advanced Bundling: Leveraged modern code-splitting (--splitting) and ESM compilation to break the application into optimal, highly-minified chunks rather than monolithic files. 🧠 Intelligent API Caching: Implemented Cache-Control headers on the server to cache API responses. Repeated queries are now served instantly from memory without hitting the backend, drastically reducing server load. 🖼️ Native Lazy Loading: Ensured all external media assets (like weather icons) use loading="lazy", so they only consume bandwidth exactly when the user needs them. The resulting Lighthouse scores are fantastic, and the Time-To-Interactive (TTI) is practically instant. Optimization is all about the little details! #WebDevelopment #PerformanceOptimization #ReactJS #TypeScript #Bun #Frontend #SoftwareEngineering #CodeQuality #CodvedaJourney #CodvedaExperience #FutureWithCodveda
To view or add a comment, sign in
-
⚛️ Zustand — A Clean & Minimal Approach to State Management in React When building applications with React, one thing that really impacts code quality over time is how you manage state. There are plenty of options out there, but Zustand stands out for keeping things simple without sacrificing flexibility. 🧠 What is Zustand? Zustand is a lightweight state management library that lets you manage global state with very little setup. 👉 No providers 👉 No reducers 👉 No heavy boilerplate It keeps things straightforward and easy to reason about. ⚡ How it works At its core, Zustand is just a simple store: import { create } from "zustand"; const useStore = create((set) => ({ count: 0, increment: () => set((state) => ({ count: state.count + 1 })), })); And you can use it anywhere in your app: const count = useStore((state) => state.count); const increment = useStore((state) => state.increment); No extra wrapping or complex setup needed. 🔥 Why Zustand works well ✔ Clean and minimal API ✔ Updates only what actually changes (better performance) ✔ No need to wrap your entire app ✔ Helps you move faster with less code ⚠️ Where to be cautious Zustand is great, but it’s not a one-size-fits-all solution. 👉 For large-scale apps with complex workflows 👉 When you need strict structure or advanced debugging tools you might want something more opinionated. 💡 Practical perspective Zustand fits really well when: ✔ Your app is small to medium in size ✔ You want to keep things simple ✔ You don’t need heavy state architecture 🚀 Final thought State management doesn’t have to be complicated. Sometimes, keeping things simple is the best decision you can make for your codebase. ❓ What are you using in your projects — Redux or Zustand? 📌 I’ll share a detailed comparison of Redux vs Zustand in my next post. #reactjs #zustand #redux #frontenddevelopment #javascript #webdevelopment #softwareengineering #fullstackdeveloper #dotnetfullstackdeveloper #react
To view or add a comment, sign in
-
-
#spatial_dev We ran into a classic SPA problem at AR Spatially: shared links looked terrible in Telegram, Slack, and LinkedIn — no previews, no metadata, just a blank card. Migrate to Next.js? Sure, in theory. In practice, that's months of work on a mature codebase with a team that has deadlines. So we built a thin SSR proxy on Express instead. The insight is simple: bots don't need an interactive UI — they just need a title, a description, and an image. Everything else is irrelevant. What we ended up with: → Zero changes to the React app → No overhead for real users — they still get a plain static SPA → Fixed Safari analytics breakage (ITP) as a side effect Wrote it all up on Medium — architecture, full code, and an honest look at the trade-offs we made 👇 https://lnkd.in/g-xyDRB9
To view or add a comment, sign in
-
I deleted 70% of useEffect calls in a production React app. Nothing broke actually it became faster. The real problem wasn't "too many effects" it was derived state computed inside effects instead of during render. Context: A dashboard with filters, sorting, and real-time updates. Each filter change triggered useEffect → setState → re-render → another useEffect classical chain reaction. What I did instead: Moved all derived data into useMemo + selector functions. Used event handlers for user actions (filters, sorting). Kept useEffect only for external sync (localStorage, analytics, WebSocket). Rule I now use: If you setState inside useEffect - stop. Ask can this be calculated during render? Result: 7 effects --> 2 effects Rerenders per filter change: from 4 --> 1 Bug: impossible (no more stale closure issues) The shift in thinking: React is not reactive like Vue or Svelte. it's declarative. State --> UI. Effects are escape hatches, not data flow tools Question for you: What is the most confusing useEffect bug you've ever debugged? #react #typeScript #frontendperformance
To view or add a comment, sign in
-
-
Stop fighting React Final Form re-initialization where the form suddenly resets and clears everything the user typed. In React, when a component re-renders, any object you create inside it gets a new "reference" or identity in memory. Since React Final Form uses a simple reference check for initialValues by default, these re-renders trick the form into thinking the data is brand new, triggering a full reset even if the values haven't changed. While using useMemo is a common fix to keep that reference stable, it can quickly make your code messy and harder to maintain as your data grows. A much simpler solution is to use the initialValuesEqual prop as shown in the snippet below. By using JSON.stringify, you tell the form to look at the actual data instead of the memory address. This keeps your form stable and protects the user's input, no matter how many times the parent component re-renders. This small change decouples your form from the component's render cycle. It ensures the form only resets when the data truly changes, making your app feel much more professional and reliable. #ReactJS #WebDevelopment #Frontend #ReactFinalForm #CodingTips
To view or add a comment, sign in
-
-
I built a simple To-Do app… and ended up redesigning how I think about UI. What started as a basic JavaScript project turned into a deep dive into: * Why directly manipulating the DOM breaks easily * Why data should be the single source of truth * How rendering from state** makes UI predictable * And how adding localStorage becomes trivial once architecture is right At first, my app worked — but it was fragile. Refreshing wiped data. UI and logic were tightly coupled. Every new feature felt harder. So I rebuilt it. Instead of “update DOM on events”, I switched to: 👉 Update data → Re-render UI from scratch That one shift changed everything. Then I added localStorage: 👉 Persist data → Load on startup → Render UI And suddenly, the app became consistent, predictable, and scalable. I also explored: * JavaScript execution phases (creation vs execution) * Event loop basics (why timing matters more than code order) * Why UI = function(state) is not just theory Below is a detailed video showcasing this project. Course Instructor: Rohit Negi | Instructor: CoderArmy #javascript #webdevelopment #frontend #learninginpublic #buildinpublic #fullstackdevelopment
To view or add a comment, sign in
-
Frontend State Management is evolving fast. But the real question is: When should you use what? Let’s break it with a real-world example 👇 Imagine you’re building an E-commerce app using React You’ll deal with different types of state: 🟢 1. UI State (Local) Example: • Open/close cart modal • Toggle dark mode 👉 Best choice: useState Because it’s simple and component-specific --- 🔵 2. Global State (Shared across app) Example: • Logged-in user • Cart items • Theme 👉 Best choice: Context API / Redux Because multiple components need access --- 🟣 3. Server State (Data from backend) Example: • Product list • Order history • User profile 👉 Best choice: React Query Why? • Caching • Auto refetch • Sync with server --- 🔴 The mistake many developers make: Using useEffect for everything ❌ Result: • Repeated API calls • No caching • Messy code --- ✅ The better approach: • useState → UI behavior • Context/Redux → App-wide data • React Query → Server data --- 💡 Key insight: Not all state is the same. Choosing the right tool: 👉 Improves performance 👉 Reduces bugs 👉 Makes your app scalable --- Frontend is no longer just about UI. It’s about **managing data efficiently** #ReactJS #Frontend #WebDevelopment #JavaScript #TechTrends
To view or add a comment, sign in
-
My client's app was bleeding users. 6.2-second load time. Brutal. The problem wasn't the design or the copy — it was a React SPA shipping a 2.4MB JavaScript bundle to every visitor before showing a single pixel. Here's what I did to fix it: → Migrated the 3 highest-traffic pages to Next.js with Server-Side Rendering (SSR) → Split the bundle using dynamic imports — lazy-loaded everything below the fold → Moved static content to Static Site Generation (SSG) with ISR for cache efficiency → Replaced heavy client-side data fetching with getServerSideProps Result after 2 weeks: — Load time: 6.2s → 2.4s (61% faster) — Largest Contentful Paint: 4.8s → 1.6s — Bounce rate dropped by 34% The client hadn't changed a single word of content. Just cleaner architecture. This is why I now audit the rendering strategy before touching the UI on every new project. What's the worst load time you've inherited on a project? Drop it below — curious how bad it gets out there. #nextjs #reactjs #webperformance #fullstackdeveloper #buildinpublic #llm #vibecoding #anthropic
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development