𝗥𝗲𝗮𝗰𝘁 𝗡𝗮𝘁𝗶𝘃𝗲 0.82 𝗶𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝗲𝘀 𝗗𝗢𝗠-𝗹𝗶𝗸𝗲 𝗡𝗼𝗱𝗲 𝗔𝗣𝗜𝘀 𝘃𝗶𝗮 𝗿𝗲𝗳𝘀! For years, React Native refs gave us 𝗹𝗶𝗺𝗶𝘁𝗲𝗱 𝗻𝗮𝘁𝗶𝘃𝗲 𝗵𝗮𝗻𝗱𝗹𝗲𝘀 — only a few methods like: • measure() • setNativeProps() Now, starting 𝗥𝗲𝗮𝗰𝘁 𝗡𝗮𝘁𝗶𝘃𝗲 0.82, refs on native components will return 𝗗𝗢𝗠-𝗹𝗶𝗸𝗲 𝗻𝗼𝗱𝗲𝘀, bringing the Web and Native worlds closer than ever. 𝗪𝗵𝗮𝘁’𝘀 𝗡𝗲𝘄 ✅ DOM-like structure navigation (parentNode, children) ✅ Layout measurement via getBoundingClientRect() ✅ ownerDocument + getElementById() support ✅ Access to Text and root document nodes ✅ 𝗕𝗮𝗰𝗸𝘄𝗮𝗿𝗱 𝗰𝗼𝗺𝗽𝗮𝘁𝗶𝗯𝗹𝗲: old APIs like measure & setNativeProps still work 𝗪𝗵𝘆 𝗧𝗵𝗶𝘀 𝗠𝗮𝘁𝘁𝗲𝗿𝘀 • One consistent API for 𝗪𝗲𝗯 + 𝗡𝗮𝘁𝗶𝘃𝗲 • Cleaner, modern way to traverse and measure the UI tree • Foundation for 𝗰𝗿𝗼𝘀𝘀-𝗽𝗹𝗮𝘁𝗳𝗼𝗿𝗺 𝗨𝗜 𝗹𝗶𝗯𝗿𝗮𝗿𝗶𝗲𝘀 and 𝘂𝗻𝗶𝗳𝗶𝗲𝗱 𝘁𝗼𝗼𝗹𝗶𝗻𝗴 This update finally makes 𝗥𝗲𝗮𝗰𝘁 𝗡𝗮𝘁𝗶𝘃𝗲 𝗳𝗲𝗲𝗹 𝗹𝗶𝗸𝗲 𝘁𝗵𝗲 𝗗𝗢𝗠 — no more weird native refs or imperative hacks. #ReactNative #ReactJS #React19 #JavaScript #MobileDevelopment #Frontend #WebDev #CrossPlatform #OpenSource
React Native 0.82 introduces DOM-like node APIs for native components
More Relevant Posts
-
💭 𝐄𝐯𝐞𝐫 𝐭𝐫𝐢𝐞𝐝 𝐛𝐮𝐢𝐥𝐝𝐢𝐧𝐠 𝐚𝐧 𝐔𝐧𝐝𝐨-𝐑𝐞𝐝𝐨 𝐟𝐞𝐚𝐭𝐮𝐫𝐞 𝐟𝐫𝐨𝐦 𝐬𝐜𝐫𝐚𝐭𝐜𝐡 𝐢𝐧 𝐑𝐞𝐚𝐜𝐭? I recently solved this interesting question by Akshay Saini 🚀 — and it turned into a great hands-on way to understand how React manages state, history, and immutability. 🎯 𝗧𝗵𝗲 𝗚𝗼𝗮𝗹 To build a text editor where we can move the state both backward (Undo) and forward (Redo) — just like in a real text editor 📝. ⚙️ 𝗧𝗵𝗲 𝗖𝗼𝗿𝗲 𝗖𝗼𝗻𝗰𝗲𝗽𝘁 Think of it like managing a timeline of states. Each time you type, React stores a snapshot of that text in a history array. We keep track of: 👉 text → current value 👉 history → list of all text snapshots 👉 currentIndex → pointer to where we are in the timeline When you: 🔹 𝐓𝐲𝐩𝐞 𝐬𝐨𝐦𝐞𝐭𝐡𝐢𝐧𝐠 𝐧𝐞𝐰: Add it to history and move forward. 🔹 𝐔𝐧𝐝𝐨: Move one step backward and show an older value. 🔹 𝐑𝐞𝐝𝐨: Move one step forward again to the latest value. If you type something after undoing, the “future” history is removed — you’ve now created a new branch of edits 🔁 💡 𝗛𝗶𝘀𝘁𝗼𝗿𝘆 𝗜𝗻 𝗔𝗰𝘁𝗶𝗼𝗻 a ➡️ ["a"] (currentIndex = 0) am ➡️ ["a", "am"] (currentIndex = 1) ama ➡️ ["a", "am", "ama"] (currentIndex = 2) Undo ⏪ → back to "am" amf ➡️ ["a", "am", "amf"] (currentIndex = 2) ✅ If we don’t remove the future states after undo, redo stops working — because we’re mixing old and new timelines 💥 That’s the trick: always keep a clean timeline of history 🕓 🧠 𝗪𝗵𝗮𝘁 𝗜 𝗟𝗲𝗮𝗿𝗻𝗲𝗱 This challenge gave me a much deeper understanding of how time-travel state management works — the same concept that powers Redux DevTools 💻 𝐅𝐮𝐥𝐥 𝐪𝐮𝐞𝐬𝐭𝐢𝐨𝐧 : https://lnkd.in/dt3Yn3pJ 🔗 𝗰𝗼𝗱𝗲: https://lnkd.in/dpuRtiuj 💬 What would you do differently — or how would you optimize this approach? Drop your thoughts below 👇 #ReactJS #FrontendDevelopment #JavaScript #WebDevelopment #StateManagement #CodeLearning
To view or add a comment, sign in
-
-
⚛️ React Just Made Form Actions So Much Cleaner The new useActionState hook is a game-changer for handling async form submissions. No more juggling useState, useEffect, or endless try/catch blocks. 🙌 Here’s how it works 👇 🧩 You provide: A form action (e.g., addToCart) An initial state And React gives you back: 1️⃣ The latest state (like a message or result) 2️⃣ A wrapped form action (formAction) 3️⃣ A flag showing if it’s still running (isPending) This means your form logic becomes simpler, more declarative, and much easier to read. Just write the action, hook it up, and React handles the rest. A small API — but it makes a big difference for building clean, async-ready UIs. ⚡ 💬 Have you tried useActionState yet? What do you think about React’s new declarative direction? #ReactJS #JavaScript #WebDevelopment #Frontend #ReactHooks #CleanCode Dhruv Patel (Borad)
To view or add a comment, sign in
-
-
💭 𝗥𝗲𝗮𝗰𝘁.𝗷𝘀 𝗼𝗿 𝗡𝗲𝘅𝘁.𝗷𝘀 — 𝗪𝗵𝗶𝗰𝗵 𝗢𝗻𝗲 𝗦𝗵𝗼𝘂𝗹𝗱 𝗬𝗼𝘂 𝗖𝗵𝗼𝗼𝘀𝗲 𝗶𝗻 𝟮𝟬𝟮𝟱? This is one of the most common questions I hear from developers starting out in frontend development 👇 ⚛️ 𝗥𝗲𝗮𝗰𝘁.𝗷𝘀 ✅ Best for building single-page applications (SPA) ✅ Full flexibility — you decide routing, structure, and tools ✅ Great for learning core frontend concepts ❌ You handle SEO, routing, and performance manually ⚡ 𝗡𝗲𝘅𝘁.𝗷𝘀 ✅ Built on top of React.js — but adds superpowers 🚀 ✅ Server-Side Rendering (SSR) and Static Site Generation (SSG) for better SEO & speed ✅ File-based routing, API routes, and built-in optimizations ✅ Perfect for production-ready and scalable apps 💡 𝗦𝗶𝗺𝗽𝗹𝗲 𝘁𝗿𝘂𝘁𝗵: 👉 Learn 𝗥𝗲𝗮𝗰𝘁.𝗷𝘀 to master the fundamentals 👉 Build with 𝗡𝗲𝘅𝘁.𝗷𝘀 to go production-ready and scale Both are amazing — but 𝗡𝗲𝘅𝘁.𝗷𝘀 𝗴𝗶𝘃𝗲𝘀 𝗥𝗲𝗮𝗰𝘁 𝗮 𝗿𝗲𝗮𝗹-𝘄𝗼𝗿𝗹𝗱 𝗲𝗱𝗴𝗲 𝗶𝗻 𝟮𝟬𝟮𝟱 💪 #React #Nextjs #WebDevelopment #Frontend #JavaScript #DevelopersJourney #Coding #TechCommunity
To view or add a comment, sign in
-
𝗛𝗼𝘄 𝗜 𝗜𝗺𝗽𝗿𝗼𝘃𝗲𝗱 𝗥𝗲𝗮𝗰𝘁 𝗔𝗽𝗽 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗪𝗶𝘁𝗵𝗼𝘂𝘁 𝗖𝗵𝗮𝗻𝗴𝗶𝗻𝗴 𝘁𝗵𝗲 𝗨𝗜 Performance isn’t always about redesigning; sometimes, it’s about rethinking. I once worked on a React project that looked fine but felt sluggish. Components re-rendered too often, and users felt the lag. Here’s what helped me optimize it without rewriting everything 👇 𝗨𝘀𝗲 𝗥𝗲𝗮𝗰𝘁.𝗺𝗲𝗺𝗼: Prevents re-renders when props don’t change. 𝗨𝘀𝗲 𝘂𝘀𝗲𝗖𝗮𝗹𝗹𝗯𝗮𝗰𝗸 𝗮𝗻𝗱 𝘂𝘀𝗲𝗠𝗲𝗺𝗼: Keeps functions and values stable between renders. 𝗖𝗼𝗱𝗲 𝘀𝗽𝗹𝗶𝘁𝘁𝗶𝗻𝗴: Load only what’s needed with dynamic imports. 𝗟𝗮𝘇𝘆 𝗹𝗼𝗮𝗱𝗶𝗻𝗴: Defer non-critical components to speed up the initial load. 𝗔𝗻𝗮𝗹𝘆𝘇𝗲 𝗯𝗲𝗳𝗼𝗿𝗲 𝗴𝘂𝗲𝘀𝘀𝗶𝗻𝗴: Tools like React Profiler help you see where the slowdown actually happens. These small optimizations dropped the load time by 𝟰𝟬% and users immediately felt the difference. 𝗙𝗿𝗼𝗻𝘁𝗲𝗻𝗱 𝗽𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗶𝘀 𝗻𝗼𝘁 𝗺𝗮𝗴𝗶𝗰, 𝗶𝘁’𝘀 𝗱𝗶𝘀𝗰𝗶𝗽𝗹𝗶𝗻𝗲. #Reactjs #FrontendPerformance #WebDevelopment #Nextjs #Optimization #JavaScript #FullStackDeveloper #CodingTips #FrontendEngineer
To view or add a comment, sign in
-
-
⚛️ React Just Made Form Actions Way Cleaner React’s new hook — useActionState — is a game-changer for handling async form submissions. No more juggling useState, useEffect, or endless try/catch blocks. 🙌 Here’s what it does 👇 🧩 You pass it: A form action (e.g., addToCart) An initial state It gives you back three things: 1️⃣ The latest state (e.g., message or result) 2️⃣ A wrapped action (formAction) 3️⃣ A flag showing if it’s still running (isPending) Now your form logic becomes simpler, more declarative, and easier to read. Just write the action, hook it up, and React handles the rest. It’s a small addition but one that makes a big difference in building clean, async-ready UIs. ⚡ 💬 Have you tried useActionState yet? What’s your take on React’s direction with these new declarative patterns? #ReactJS #JavaScript #WebDevelopment #Frontend #ReactHooks #CleanCode #AsyncProgramming #DeveloperExperience #SoftwareEngineering #CodingTips #ReactDevelopers #DevCommunity #UIUX
To view or add a comment, sign in
-
-
SolidJS: why developers are calling it the “React killer” SolidJS offers reactivity without a Virtual DOM and near-zero overhead. Core benefits: Fine-grained reactivity → faster than React’s reconciliation. Simple syntax similar to React → easy learning curve. Backed by real-world production apps and growing ecosystem. Solid isn’t a hype — it’s the natural evolution of declarative UIs. Source: https://lnkd.in/e-Vb2_6f #SolidJS #Frontend #JavaScript #Performance #WebDevelopment
To view or add a comment, sign in
-
⚡ 𝐅𝐫𝐨𝐦 𝐂𝐥𝐚𝐬𝐬 𝐭𝐨 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧𝐚𝐥: 𝐀 𝐌𝐨𝐝𝐞𝐫𝐧 𝐑𝐞𝐚𝐜𝐭 𝐉𝐨𝐮𝐫𝐧𝐞𝐲 Recently worked on migrating old class components to functional components using hooks, and wow — what a difference! 🎯 The code instantly felt cleaner, easier to read, and more reusable. No more juggling this everywhere or managing complex lifecycle methods — just simple hooks like useState, useEffect, and useMemo. The biggest win? ✅ 𝑩𝒆𝒕𝒕𝒆𝒓 𝒑𝒆𝒓𝒇𝒐𝒓𝒎𝒂𝒏𝒄𝒆 ✅ 𝑺𝒊𝒎𝒑𝒍𝒆𝒓 𝒍𝒐𝒈𝒊𝒄 𝒇𝒍𝒐𝒘 ✅ 𝑬𝒂𝒔𝒊𝒆𝒓 𝒕𝒐 𝒕𝒆𝒔𝒕 𝒂𝒏𝒅 𝒎𝒂𝒊𝒏𝒕𝒂𝒊𝒏 If you’ve ever worked on modernizing an old React codebase, you know the satisfaction of seeing that refactor pay off! 💪 How was your experience switching from classes to hooks? #ReactJS #WebDevelopment #CodeRefactoring #JavaScript #ReactHooks #CleanCode #ReactNative
To view or add a comment, sign in
-
🎯 𝗗𝗲𝗲𝗽 𝗗𝗶𝘃𝗲 𝗶𝗻𝘁𝗼 𝗥𝗲𝗮𝗰𝘁 𝗛𝗼𝗼𝗸𝘀 — 𝗪𝗿𝗶𝘁𝗶𝗻𝗴 𝗦𝗺𝗮𝗿𝘁𝗲𝗿, 𝗖𝗹𝗲𝗮𝗻𝗲𝗿 & 𝗠𝗼𝗱𝗲𝗿𝗻 𝗥𝗲𝗮𝗰𝘁 𝗖𝗼𝗱𝗲 Today, I explored React Hooks, the game-changing feature that makes functional components powerful, scalable, and easy to work with — no more class components, no more this confusion! Hooks help manage state, handle side-effects, optimize performance, and build reusable logic — all with cleaner syntax. ⚙️ 𝗖𝗼𝗿𝗲 𝗛𝗼𝗼𝗸𝘀 𝗬𝗼𝘂 𝗠𝘂𝘀𝘁 𝗞𝗻𝗼𝘄 𝐇𝐨𝐨𝐤 𝐖𝐡𝐚𝐭 𝐈𝐭 𝐃𝐨𝐞𝐬: ✅ useState — Manage component-level state (forms, toggles, counters) ✅ useEffect — Side effects: API calls, DOM updates, subscriptions ✅ useContext — Share values globally without prop-drilling ✅ useReducer — Advanced state logic (Redux-like patterns) ✅ useRef — Access DOM nodes & store mutable values ✅ useMemo — Cache expensive calculations ✅ useCallback — Memoize functions to avoid re-renders ✅ useLayoutEffect — Synchronous effect before paint ✅ useImperativeHandle — Control child component methods ✅ useDebugValue — Debug custom hooks 🚀 𝗥𝗲𝗮𝗹-𝗪𝗼𝗿𝗹𝗱 𝗨𝘀𝗲 𝗖𝗮𝘀𝗲𝘀 ✨ 𝐿𝑖𝑣𝑒 𝑑𝑎𝑠ℎ𝑏𝑜𝑎𝑟𝑑𝑠 & 𝑎𝑛𝑎𝑙𝑦𝑡𝑖𝑐𝑠 ✨ 𝐹𝑜𝑟𝑚 𝑠𝑡𝑎𝑡𝑒 + 𝑣𝑎𝑙𝑖𝑑𝑎𝑡𝑖𝑜𝑛 𝑠𝑦𝑠𝑡𝑒𝑚𝑠 ✨ 𝐷𝑎𝑡𝑎 𝑓𝑒𝑡𝑐ℎ𝑖𝑛𝑔 & 𝑐𝑎𝑐ℎ𝑖𝑛𝑔 𝑙𝑜𝑔𝑖𝑐 ✨ 𝑃𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑛𝑐𝑒-𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 𝑈𝐼 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡𝑠 ✨ 𝑀𝑜𝑑𝑢𝑙𝑎𝑟 𝑟𝑒𝑢𝑠𝑎𝑏𝑙𝑒 𝑈𝐼 𝑙𝑜𝑔𝑖𝑐 𝑣𝑖𝑎 𝐶𝑢𝑠𝑡𝑜𝑚 𝐻𝑜𝑜𝑘𝑠 💡 𝗪𝗵𝘆 𝗛𝗼𝗼𝗸𝘀 𝗠𝗮𝘁𝘁𝗲𝗿 𝗶𝗻 𝟮𝟬𝟮𝟱 𝐹𝑎𝑠𝑡𝑒𝑟 𝑑𝑒𝑣𝑒𝑙𝑜𝑝𝑚𝑒𝑛𝑡 𝐶𝑙𝑒𝑎𝑛𝑒𝑟 𝑐𝑜𝑑𝑒𝑏𝑎𝑠𝑒 𝐵𝑒𝑡𝑡𝑒𝑟 𝑝𝑒𝑟𝑓𝑜𝑟𝑚𝑎𝑛𝑐𝑒 𝑀𝑜𝑑𝑒𝑟𝑛 𝑅𝑒𝑎𝑐𝑡 𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝗨𝘀𝗲𝗱 𝗶𝗻 𝗲𝘃𝗲𝗿𝘆 𝗮𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗥𝗲𝗮𝗰𝘁 𝗽𝗿𝗼𝗷𝗲𝗰𝘁 📌 React Hooks = Modern React 𝑀𝑎𝑠𝑡𝑒𝑟 𝑡ℎ𝑒𝑚 𝑎𝑛𝑑 𝑦𝑜𝑢'𝑟𝑒 𝑎𝑙𝑟𝑒𝑎𝑑𝑦 𝑎ℎ𝑒𝑎𝑑 𝑖𝑛 𝑡ℎ𝑒 𝑓𝑟𝑜𝑛𝑡𝑒𝑛𝑑 𝑔𝑎𝑚𝑒 🚀 credit- Mounika M #ReactJS #ReactHooks #FrontendDevelopment #JavaScript #WebDevelopment #MERNStack #CleanCode #TechLearning
To view or add a comment, sign in
-
Custom Hooks in React 🔁 If you’ve worked with React, you already know how powerful built-in hooks like useState and useEffect are. But the real magic begins when you start creating your own custom hooks. Custom hooks allow developers to extract and reuse logic across different components. Instead of repeating the same logic in multiple places, you can simply wrap it inside a custom hook — keeping your code clean, modular, and easier to maintain. 💡 Why use Custom Hooks? Reuse complex logic across components Keep components focused purely on UI Improve readability and scalability Simplify debugging and testing For example, you could create custom hooks for things like API fetching, managing authentication, handling dark mode, or tracking window size. In short, custom hooks bring structure and reusability to your React applications — turning repetitive patterns into elegant, maintainable code. #React #WebDevelopment #Frontend #JavaScript #Coding #Hooks #CustomHooks #TechLearning #ReactJS #stemup
To view or add a comment, sign in
-
🚀 Solving the “Too Many API Calls” Problem Using React Hooks If you’ve ever built a live search feature in React, you’ve probably noticed a common issue — every keystroke triggers an API call 😅. This can easily overwhelm your backend and slow down the user experience. To solve this, I implemented a debounced search box using React’s useState and useEffect hooks. 💡What it does: Waits for the user to stop typing (500ms delay) before making an API request Cancels the previous timer on each keystroke to avoid redundant calls Keeps the UI responsive and the API efficient Here’s the idea in action 👇 This small optimization makes a big difference — your search stays fast while your API breathes easy. Have you used debouncing or throttling in your projects? How did it impact performance? #ReactJS #JavaScript #FrontendDevelopment #WebPerformance #APIDesign #CodingTips #useEffect #ReactHooks
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