Magewire 3 - Update

Resume

More than seven months ago, after Livewire 3 was introduced to the world, I began porting this new version to Magento. I wanted to take a completely different approach with this version, having learned from the previous one that porting features can be extremely challenging when trying to adhere to Magento standards while also being tied to certain expectations set by Livewire. As a result, Magewire 1 became a strange mix where I quickly realized that making certain features compatible in a way that allowed them to evolve alongside Livewire updates was almost impossible.

To realize this new vision, I had to fully understand the architecture of Livewire 3, which led to weeks of research. Afterward, I began considering how to implement this in Magento and quickly concluded that, in some areas, I simply had to step away from the "Magento" standards. Instead, I needed to explore whether I could make Livewire 3 work within Magento. There's a long story behind this, but in short: it worked. No, it wasn’t easy, and it requires certain tools, but the result is that approximately 80% of all the code remains the original Livewire code.

Magewire 1

Magewire 1 has reached the end of its journey. Yet, it deserves full credit, as I’ve seen how this version has helped many agencies build features with minimal effort—work that would normally take hours, if not days, to complete. I still receive weekly messages from agency owners, developers, and even merchants expressing how happy they are with Magewire.

We also can’t overlook the success of Hyvä Checkout. Magewire plays a crucial role in delivering all its features. Thanks to Hyvä Checkout, Magewire has now surpassed 400,000 downloads via packages. In recent weeks, downloads have seen a significant boost, reaching around 1,500 per day. Impressive results, if you ask me, and I hope we can keep this momentum going into 2025.

Promotion

In 2024, I focused on promoting Magewire to a wider audience. As part of this effort, I had the privilege of presenting the upcoming Magewire 3 version during MageTitans in Groningen (NL). In this presentation, I gave a select group a brief look at the expected improvements and the optimizations in the pipeline. The feedback was overwhelmingly positive, providing a motivational boost to keep pushing forward.

Additionally, I collaborated with Jisse Reitsma from Yireo to organize several hackathons, bringing together Magewire enthusiasts to work on Magewire 3. The first hackathon had its challenges, as it took some adjustment—especially since Magewire 3 was still very much under development at the time. Fortunately, the second hackathon went much more smoothly, and another is already scheduled for January 2025. You can find more information about it on the Yireo website.

Currently

It has been a long journey with many obstacles to overcome to get Magewire 3 to where it is today. In the meantime, I’ve also received the wonderful news that I’m going to become a parent. As you can imagine, I haven’t been idle, and my goal is to release a first alpha version to the public before the baby arrives.

If that succeeds, the next phase will involve processing feedback and reviewing pull requests. The plan is to tag the first version in March or April. I’m optimistic this timeline is achievable, but I’ll need your help with testing to make it happen.

What to Expect

Magewire 3 takes a significant leap forward while retaining much of its backwards compatibility. However, if you've built features that push the boundaries of the architecture, some adjustments may be required. If you've primarily relied on the frontend API, changes will be minimal—for example, updating wire:model to wire:model.live, as all models will now be deferred by default.

Performance optimization has also been a key focus. Loading Layout XML is now significantly faster, and features like request bundling make this version highly efficient. Bundling is applied when a Magewire update request returns from the server and multiple components need refreshing. Previously, each component triggered a separate XHR request, but now these are combined into a single request. These optimizations address one of Magewire 1's biggest bottlenecks, giving me confidence that this challenge has been resolved.

I'm also excited to share that Magewire 3 will work natively in the admin panel. While this currently relies on a somewhat hacky implementation—due to AlpineJS not being loaded in the backend by default—I'm actively exploring ways to solidify the JS integration. The initial tests with Magewire 3 in the backend have been promising, and I’m enthusiastic about the opportunities this opens up.

Lastly, I've been developing a completely new feature called View Instructions. This allows developers to craft frontend instructions in a fluent manner using PHP. For example, you could attach a click listener to a button to trigger a specific action. While still in its early stages, this feature looks incredibly promising and will be a game-changer for both backend and frontend developers. View Instructions will be available in themes and the admin panel, making it a versatile tool for building backend-driven features.

Shout out

2024 has brought its fair share of challenges, which haven’t always allowed me to fully focus on Magewire 3. Yet, the enthusiasm of contributors and sponsors (agencies and freelance developers) has continually given me the boost to keep going.

I’ve noticed—and continue to notice—that adopting new open source techniques within our community is, to say the least, far from easy. I look forward to a future where our community becomes a even more unified bubble. There’s so much great work happening, and I hope we can come together to embrace and support these innovations rather than letting them slip by.

One of my key goals for the new year is to continue supporting this progress and fostering collaboration.

Contributions

If you’re excited and eager to contribute to Magewire 3, feel free to reach out. I’m looking for core contributors to help the framework excel and maintain its growth. It doesn’t need to be a large group—just a few individuals could add tremendous value.

Thank you!

In many ways, I’m looking forward to 2025, and I’d like to take this opportunity to wish you a Merry Christmas and a prosperous (and technically exciting) new year. Here’s to a year full of innovation!

Magewire 3 has been a work in progress for quite some time, evolving through periods of on-and-off development. While my sponsors have been receiving bi-monthly updates on the progress and upcoming features, it’s now time to share what I’ve been cooking up over the past few months with everyone else.