Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Use Vue or React Components in a Livewire App with MingleJS

    Use Vue or React Components in a Livewire App with MingleJS

    May 9, 2024

    MingleJS is a helper for using Vue and React components in a Livewire or Filament application. Created by Joao Patricio, this package is useful for landing pages and complex components where you want to use Vue or React. It can also be used as an incremental way to adopt Livewire or utilize third-party components in the Vue or React ecosystem.

    MingleJS Demo Component

    MingleJS works by rendering a <div> on the server side and then mounts a component on the client side. A server-side Livewire component renders each JS component, so you get JavaScript interactivity on the front end that is isolated to your Livewire component. Additionally, the backend can pass data to the component available on the front end.

    namespace AppLivewire;

    use IjpatricioMingleConcernsInteractsWithMingles;
    use IjpatricioMingleContractsHasMingles;
    use LivewireComponent;

    class ChatApp extends Component implements HasMingles
    {
    use InteractsWithMingles;

    public function component(): string
    {
    return ‘resources/js/ChatApp/index.js’;
    }

    public function mingleData()
    {
    return [
    ‘message’ => ‘Message in a bottle 🍾’,
    ];
    }

    // …
    }

    A mingle includes a Livewire component that uses the InteractsWithMingles trait, a glue JavaScript file, and the frontend component file. Here’s an example of what the Mingle component might look like using React:

    // resources/js/ChatApp/index.js
    import mingle from ‘@mingle/mingleReact’
    import ChatApp from ‘./ChatApp.jsx’

    mingle(‘resources/js/ChatApp/index.js’, ChatApp)

    // resources/js/ChatApp/ChatApp.jsx
    import React from ‘react’

    function ChatApp({wire, …props}) {

    const message = props.mingleData.message

    console.log(message) // ‘Message in a bottle 🍾’

    wire.doubleIt(2)
    .then(data => {
    console.log(data) // 4
    })

    return (
    <div>
    {/* <!– Create something great! –> */}
    </div>
    )
    }

    export default ChatApp

    Learn More

    To get started with MingleJS, head over to the MingleJS documentation. The author of MingleJS has also provided an open-source MingleJS demo app, and a live demo if you want to kick the tires.

    The post Use Vue or React Components in a Livewire App with MingleJS appeared first on Laravel News.

    Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.

    Source: Read More 

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCybersecurity Alert: F5’s Next Central Manager Under Attack by Remote Exploits
    Next Article Perficient Atlanta: Making a Community Impact in 2024

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 17, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2024-47893 – VMware GPU Firmware Memory Disclosure

    May 17, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    The upcoming DigIT Pharma & eHealth 2024 Conference in Dusseldorf

    Artificial Intelligence

    How this Roku streaming stick made my 15-year-old TV feel like new again

    News & Updates

    The Importance of Mobile Optimization for Websites

    Development

    Meta AI Proposes Multi-Token Attention (MTA): A New Attention Method which Allows LLMs to Condition their Attention Weights on Multiple Query and Key Vectors

    Machine Learning

    Highlights

    CVE-2025-4639 – Peergos XML XXE Vulnerability

    May 14, 2025

    CVE ID : CVE-2025-4639

    Published : May 14, 2025, 6:15 p.m. | 51 minutes ago

    Description : CWE-611 Improper Restriction of XML External Entity Reference in the getDocumentBuilder() method of WebDav servlet in Peergos. This issue affects Peergos through version 1.1.0.

    Severity: 0.0 | NA

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    CVE-2025-32403 – RT-Labs P-Net OOB Write Vulnerability

    May 7, 2025

    Amazon Introduces Amazon Nova: A New Generation of SOTA Foundation Models that Deliver Frontier Intelligence and Industry Leading Price-Performance

    December 3, 2024

    CVE-2025-2866 – LibreOffice PDF Signature Spoofing

    April 27, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.