If you’ve ever tried to use createPortal in React Native, you probably ran into challenges. On the web, it’s the standard way to render children into a different part of the DOM, but in React Native? It’s been a missing piece of the puzzle for years, forcing us to rely on workarounds like @gorhom/portal or the 𝗿𝗲𝗮𝗰𝘁-𝗻𝗮𝘁𝗶𝘃𝗲-𝘁𝗲𝗹𝗲𝗽𝗼𝗿𝘁 library we recently talked about. But things are changing. 𝗥𝗲𝗮𝗰𝘁 𝗡𝗮𝘁𝗶𝘃𝗲 𝗣𝗥 #𝟱𝟱𝟰𝟲𝟯 just dropped: experimental support for 𝗥𝗲𝗮𝗰𝘁 𝗣𝗼𝗿𝘁𝗮𝗹𝘀 𝗶𝗻 𝗙𝗮𝗯𝗿𝗶𝗰. 𝗪𝗵𝗮𝘁’𝘀 𝗵𝗮𝗽𝗽𝗲𝗻𝗶𝗻𝗴? Historically, portals were "DOM magic." Since React Native doesn't have a DOM, the architecture didn't quite know how to handle them. This PR leverages the 𝗡𝗲𝘄 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 (Fabric) to intercept shadow tree commits and manually mount portal children into the native view hierarchy. It’s essentially teaching the Fabric renderer how to handle createPortal natively. ➡️ 𝗧𝗿𝘂𝗲 𝗥𝗲𝗮𝗰𝘁 𝗣𝗮𝗿𝗶𝘁𝘆: You can finally write code that looks and behaves like standard React, making cross-platform (Web/Mobile) components much easier to maintain. ➡️ 𝗖𝗼𝗻𝘁𝗲𝘅𝘁 𝗣𝗿𝗲𝘀𝗲𝗿𝘃𝗮𝘁𝗶𝗼𝗻: Unlike some current JS-heavy hacks, this approach is designed to keep React context and event bubbling intact. ➡️ 𝗟𝗲𝗮𝗻𝗲𝗿 𝗔𝗽𝗽𝘀: If this makes it into core, we can stop installing third-party libraries just to show a simple tooltip or modal. We literally just shared how 𝗿𝗲𝗮𝗰𝘁-𝗻𝗮𝘁𝗶𝘃𝗲-𝘁𝗲𝗹𝗲𝗽𝗼𝗿𝘁 is the best way to handle this right now. If this PR lands in a stable release, it might eventually make those specialised libraries obsolete. That’s the nature of the ecosystem—today's essential library becomes tomorrow's built-in feature. Before you go deleting your third-party libraries, keep in mind: 𝘁𝗵𝗶𝘀 𝗶𝘀 𝘀𝘁𝗶𝗹𝗹 𝗶𝗻 𝘁𝗵𝗲 𝗣𝘂𝗹𝗹 𝗥𝗲𝗾𝘂𝗲𝘀𝘁 𝘀𝘁𝗮𝗴𝗲. It’s highly experimental and involves changes to the core React renderer files. #ReactNative #Fabric #ReactJS #Portals #OpenSource #MobileDev #JavaScript #TypeScript #SoftwareEngineering #DevTools #Meta
Luke Brandon Farrell’s Post
More Relevant Posts
-
⚛️🤯 𝐑𝐞𝐚𝐜𝐭 𝐡𝐚𝐬 𝐜𝐡𝐚𝐧𝐠𝐞𝐝, 𝐚𝐧𝐝 𝐲𝐨𝐮 𝐦𝐢𝐠𝐡𝐭 𝐬𝐭𝐢𝐥𝐥 𝐛𝐞 𝐝𝐨𝐢𝐧𝐠 𝐢𝐭 𝐭𝐡𝐞 "𝐨𝐥𝐝 𝐰𝐚𝐲"! 🤯⚛️ Ever felt like your JS bundle is getting way too heavy for the browser? Well, the React ecosystem evolved to fix exactly that with Server Components! Imagine React as a store that sold a furniture: 𝗧𝗵𝗲 𝗧𝗿𝗮𝗱𝗶𝘁𝗶𝗼𝗻𝗮𝗹 𝗪𝗮𝘆: It sends the box, the manual, and all the tools for the client to build the furniture alone (heavy and slow). 𝗪𝗶𝘁𝗵 𝗦𝗲𝗿𝘃𝗲𝗿 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀: It delivers the furniture already assembled and ready to use! The server does the heavy lifting, and the browser just displays the result. 𝗪𝗵𝘆 𝗶𝘀 𝘁𝗵𝗲 𝗵𝘆𝗽𝗲 𝗿𝗲𝗮𝗹? 1. 𝙕𝙚𝙧𝙤 𝘽𝙪𝙣𝙙𝙡𝙚 𝙎𝙞𝙯𝙚: Less JavaScript sent to the browser = lightning-fast sites! 2. 𝙀𝙡𝙞𝙩𝙚 𝙎𝙀𝙊: Content arrives ready for search engine crawlers. 3. 𝘾𝙡𝙚𝙖𝙣𝙚𝙧 𝘾𝙤𝙙𝙚: Say goodbye to that mess of 𝚞𝚜𝚎𝙴𝚏𝚏𝚎𝚌𝚝 and 𝚞𝚜𝚎𝚂𝚝𝚊𝚝𝚎 just to fetch simple data. This is the trend dominating frameworks like 𝗡𝗲𝘅𝘁.𝗷𝘀 and changing the game for Frontend development! Hi, if you liked the post, please like it. This helps LinkedIn share my post with others and spread knowledge to a wider audience. Thank you! #ReactJS #WebDevelopment #Programming #NextJS #Frontend #TechTrends #JuniorDeveloper #CodingLife
To view or add a comment, sign in
-
-
🚀 5 React Concepts That Transformed My Development Workflow After spending countless hours building with React, I've discovered that the real power isn't in the syntax—it's in understanding the "why" behind the patterns. Here are 5 game-changing concepts every React developer should know: 🔁 1. The Closure Trap in Hooks useEffect and useState rely on closures. If you're not careful with dependency arrays, you'll be debugging stale values for hours. Understanding JavaScript closures = mastering React hooks. 🎭 2. Render Props Pattern Before hooks, this was the king of sharing logic. Still incredibly useful when you need to share code between components with flexible rendering needs. It's like passing JSX as a function—pure genius. 🧩 3. Error Boundaries One error shouldn't crash your entire app. Error boundaries let you fail gracefully, showing fallback UI while keeping the rest of your application functional. Your users will thank you. ⚡ 4. Memoization Strategies React.memo, useMemo, useCallback—they're not just performance tools. They're about preventing unnecessary re-renders and optimizing expensive calculations. Use them wisely, or don't use them at all. 🔄 5. The Power of useRef Beyond DOM References useRef persists values across renders without triggering re-renders. Perfect for tracking previous values, storing interval IDs, or keeping mutable data that shouldn't cause updates. 🎯 Bonus: Component Lifecycle in the Hooks Era useEffect combined with useRef can replicate componentDidMount, componentDidUpdate, and componentWillUnmount with cleaner, more readable code. React isn't just about building UIs—it's about building UIs that scale, perform, and make developers happy. 🌟 What's one React concept that clicked for you late in your journey? Share below! 👇 #ReactJS #WebDevelopment #FrontendEngineering #JavaScript #CodingTips #ReactHooks #SoftwareEngineering #TechCommunity #DeveloperProductivity #WebDevLife
To view or add a comment, sign in
-
"This is what production projects taught me about React & Next.js It's not React vs Next.js. It's React and Next.js. After working on live production projects, here's what I've learned React gives you freedom. You control architecture, state, structure. Perfect for dashboards, SPAs, internal tools. Next.js gives you structure. Built-in routing. Better performance. SEO ready. SSR/SSG out of the box. As projects scale, complexity increases. And that's where structure starts winning. React builds fundamentals. Next.js builds scalable products. The real skill isn't choosing one. It's knowing when to use which. Framework debates are easy. Architectural thinking is rare. #ReactJS #NextJS #FrontendDeveloper #WebDevelopment #JavaScript #Development #Backend
To view or add a comment, sign in
-
-
The Ultimate Showdown: React vs. Next.js ⚡ Most developers think they have to pick one... 🤯 I used to think that too! 👀 But once I realized how they actually work together, everything clicked. Here’s the "No-BS" breakdown: 👇 ⚛️ React (The Library) ✅ The Engine: It’s a UI library for building components. ⚡ Client-Side Power: Everything happens in the browser. 🌍 Pure Freedom: You choose your own routing, styling, and state management. 🚀 Best for: Highly interactive SPAs (Single Page Apps) and internal tools. 🖤 Next.js (The Framework) 🏗️ The Full Car: It’s built on top of React. It has the engine plus the seats, GPS, and AC. 📡 Server-Side Magic: Uses SSR & SSG for lightning-fast loading and SEO. 🧰 Zero Config: Routing, API routes, and optimization are built-in. 🏢 Best for: E-commerce, Blogs, and anything that needs to rank on Google. 🧠 The Real Difference: ⚛️ React = You build it all from scratch. 🖤 Next.js = It's ready to ship out of the box. 👉 Which one to pick? ⚡ Want total control & client-side focus? → Go with React. 📈 Want SEO, speed, and a full-stack feel? → Go with Next.js. #ReactJS #NextJS #Angular #WebDevelopment #Programming #Coding #SoftwareEngineering #Frontend #Technology #Innovation #100DaysOfCode #JavaScript #FullStack #WebDesign #CareerGrowth
To view or add a comment, sign in
-
-
🚀 What is React.js? (Explained Simply) Modern web applications need fast, interactive, and scalable user interfaces. That’s where React.js comes in. React is a JavaScript library used to build dynamic and component-based user interfaces. Instead of building a full page again and again, React allows developers to create reusable components. Think of it like building a website with LEGO blocks. Each block can represent a part of the UI like: • Navbar • Button • Product card • Dashboard widget React also uses Virtual DOM, which updates only the changed part of the page instead of reloading everything. Result: ✔ Faster applications ✔ Better user experience ✔ Reusable components ✔ Scalable architecture That’s why many modern applications rely on React. Still learning. Still building. 🚀 — Anuj Pathak #reactjs #javascript #webdevelopment #frontenddevelopment #softwareengineering #developersoflinkedin #programming #techlearning #learninginpublic #webdeveloper #codinglife #softwaredeveloper #buildinpublic
To view or add a comment, sign in
-
-
React vs Next.js — My Practical Take After building real projects, here’s what became clear: React (the library) Gives you control Forces you to understand rendering Teaches core architecture decisions Requires manual setup (routing, optimization, SSR setup) Next.js (the framework built on React) Production-ready routing SSR / SSG / ISR out of the box Built-in performance optimizations Better SEO by default Structured conventions that reduce architectural mistakes React builds fundamentals. Next.js accelerates production. If you don’t understand React deeply, Next.js becomes a black box. If you understand React deeply, Next.js becomes a superpower. My Current Approach • I use React to master rendering behavior and state architecture • I use Next.js for scalable, production-grade applications Both are powerful. But fundamentals always come first. What do you prefer for serious production apps — React or Next.js? #ReactJS #NextJS #FrontendDevelopment #WebDevelopment #JavaScript #FullStackDeveloper #SoftwareEngineering #PerformanceOptimization #TechCareers #Developers
To view or add a comment, sign in
-
🚀 Day 14/100: #100DaysOfCode Today was all about understanding the "Why" and "How" behind ReactJS, Next.js, and how they compare to other industry leaders like Vue.js. As I progress through my #100DaysOfCode, I’m realizing that choosing the right tool is just as important as writing the code itself. Here’s a breakdown of what I covered today: 1. What is ReactJS? React is a declarative, component-based JavaScript library for building UIs. It’s fast, flexible, and maintained by Meta (Facebook). The Magic of the Virtual DOM: Instead of refreshing the entire page, React uses a "Virtual DOM" to compare changes and only update the specific elements that actually changed. This is why React apps feel so snappy! 2. ReactJS vs. Next.js: Library vs. Framework ReactJS is a library focused on the View layer. It gives you freedom but requires you to pick your own tools for routing and state management. Next.js is a full-stack framework built on top of React. It comes with "batteries included"—built-in routing, Server-Side Rendering (SSR), and Static Site Generation (SSG) for better SEO and performance. 3. The Landscape: React vs. Next vs. Vue I spent some time comparing these three at a glance: Data Binding: React and Next use one-way data flow (predictable), while Vue supports two-way data binding (faster for simple forms). Scalability: While React is highly flexible, Next.js provides a more structured architecture for complex, large-scale applications. Why choose React? Pros: Simple design (JSX), massive community support, and total freedom to tailor tech stack. Cons: It’s not a full-scale framework out of the box, meaning you’ll need 3rd-party libraries for routing and validation. #100DaysOfCode #ReactJS #NextJS #VueJS #WebDevelopment #Programming #JavaScript #SoftwareEngineering #MERN
To view or add a comment, sign in
-
What Runs First in React? Most React developers know what useEffect, useMemo, and useCallback do individually. Far fewer know the exact order they execute in. And that gap causes bugs that are surprisingly difficult to trace. Here is the definitive execution order on first mount: -> Step 1: Rendering JSX React runs the function body of your component first. JSX is evaluated. console.log inside the return runs here. This is the render phase. -> Step 2: useMemo runs during render useMemo executes synchronously during the render phase, not after it. If you have an expensive computation wrapped in useMemo, it runs as part of building the component output. This is why useMemo can be used to compute values that are needed in the JSX itself. -> Step 3: useEffect runs after render After the component has rendered and the DOM has been updated, useEffect fires. It is intentionally deferred. This is where API calls, subscriptions, and side effects belong because they should not block the render. -> useCallback is different from all of them useCallback does not run during mounting. It stores a function reference. That function only executes when it is explicitly called. In the example on the right, increment only logs when you actually call increment(). The final order: Rendering JSX, then useMemo, then useEffect. Why this matters in practice: If you expect useEffect to run before useMemo, your state update will not be available when useMemo computes. If you expect useCallback to run automatically, your side effect will never fire. Getting the order wrong means working with stale data and writing code that behaves differently than you intended. Understanding execution order is not academic. It is the difference between components that behave predictably and ones that produce subtle timing bugs you spend hours debugging. Did you know the exact execution order before seeing this or did it surprise you? #React #ReactHooks #FrontendDevelopment #JavaScript #WebDevelopment #Developers
To view or add a comment, sign in
-
-
🔄 Understanding useReducer in React When managing state in React, most developers start with useState. But as applications grow, state logic can become complex. That’s where useReducer becomes very useful. Think of useReducer as a more structured way to manage state, especially when multiple state changes depend on specific actions. 📌 What is useReducer? useReducer is a React Hook that lets you manage state using a reducer function. It works similarly to how reducers work in Redux. It takes two main things: 1️⃣ A reducer function 2️⃣ An initial state const [state, dispatch] = useReducer(reducer, initialState); state → the current state dispatch → a function used to send actions reducer → decides how state should change 📌 Example const initialState = { count: 0 }; function reducer(state, action) { switch (action.type) { case "increment": return { count: state.count + 1 }; case "decrement": return { count: state.count - 1 }; default: throw new Error("Unknown action"); } } function Counter() { const [state, dispatch] = useReducer(reducer, initialState); return ( <> <p>{state.count}</p> <button onClick={() => dispatch({ type: "increment" })}> Increment </button> <button onClick={() => dispatch({ type: "decrement" })}> Decrement </button> </> ); } Here, instead of directly updating state like setCount, we dispatch actions and the reducer decides how the state should change. 📌 When Should You Use useReducer? ✅ When state logic is complex ✅ When multiple state updates depend on each other ✅ When managing objects or multiple state values ✅ When you want predictable state transitions 💡 Key Insight useReducer separates state logic from UI logic, making your components easier to read, test, and maintain. As React applications grow, this pattern helps keep your state management clean and scalable. 💬 Are you using **useState or useReducer more often in your React projects? #React #FrontendDevelopment #JavaScript #WebDevelopment #ReactHooks #LearningInPublic
To view or add a comment, sign in
-
-
The Web Development Journey 🚀 From structure… to scale. 🏗 HTML – The foundation. 🎨 CSS – The design & experience. ⚡ JavaScript – The interactivity. 🧩 React – Component-driven architecture. 🚀 Next.js – Production-grade, scalable applications. What starts as a simple structure evolves into full-scale, high-performance web applications serving users worldwide. Modern web development is no longer just about building pages — it’s about: ✔ Performance optimization ✔ SEO & Server-Side Rendering ✔ Scalable architecture ✔ Seamless UX ✔ Production-ready deployments The real growth happens when you move from learning syntax → to building systems → to shipping products at scale. Every developer starts with HTML. Not everyone reaches scalable architecture. Where are you in your journey? Let’s connect if you're building with React, Next.js, or modern JavaScript ecosystems 🤝 #WebDevelopment #FrontendDeveloper #JavaScript #ReactJS #NextJS #FullStackDeveloper #SoftwareEngineering #Frontend #TechCareers #BuildInPublic #DeveloperJourney #Programming #CodingLife #StartupTech #PerformanceOptimization
To view or add a comment, sign in
-
More from this author
-
No-Node Native Apps, Sub-Millisecond Text Math, and Sending 3,000 Lines of C++ to Valhalla
Luke Brandon Farrell 5d -
Metro MCP, 147 Haptic Presets, and the 104x Faster Way to Draw a Heart
Luke Brandon Farrell 1w -
React Native 0.85, C++ Music Queues, and Your New Silicon and Carbon Family
Luke Brandon Farrell 2w
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
Source: https://github.com/facebook/react-native/pull/55463 If you’re a React Native developer and want to stay ahead of the curve (with a laugh or two) on the latest updates—without spending hours sifting through release notes. Catch the latest in our newsletter, The React Native Rewind 👇 https://thereactnativerewind.com