<small id='kSfO6'></small><noframes id='kSfO6'>

      <i id='kSfO6'><tr id='kSfO6'><dt id='kSfO6'><q id='kSfO6'><span id='kSfO6'><b id='kSfO6'><form id='kSfO6'><ins id='kSfO6'></ins><ul id='kSfO6'></ul><sub id='kSfO6'></sub></form><legend id='kSfO6'></legend><bdo id='kSfO6'><pre id='kSfO6'><center id='kSfO6'></center></pre></bdo></b><th id='kSfO6'></th></span></q></dt></tr></i><div id='kSfO6'><tfoot id='kSfO6'></tfoot><dl id='kSfO6'><fieldset id='kSfO6'></fieldset></dl></div>
        <bdo id='kSfO6'></bdo><ul id='kSfO6'></ul>
    1. <tfoot id='kSfO6'></tfoot>
      <legend id='kSfO6'><style id='kSfO6'><dir id='kSfO6'><q id='kSfO6'></q></dir></style></legend>

        在 Laravel 中同时使用 React.js 和 Vue.js

        时间:2023-09-06

            <legend id='gCBJ0'><style id='gCBJ0'><dir id='gCBJ0'><q id='gCBJ0'></q></dir></style></legend>
              <bdo id='gCBJ0'></bdo><ul id='gCBJ0'></ul>
                • <small id='gCBJ0'></small><noframes id='gCBJ0'>

                    <tbody id='gCBJ0'></tbody>
                  <tfoot id='gCBJ0'></tfoot>

                • <i id='gCBJ0'><tr id='gCBJ0'><dt id='gCBJ0'><q id='gCBJ0'><span id='gCBJ0'><b id='gCBJ0'><form id='gCBJ0'><ins id='gCBJ0'></ins><ul id='gCBJ0'></ul><sub id='gCBJ0'></sub></form><legend id='gCBJ0'></legend><bdo id='gCBJ0'><pre id='gCBJ0'><center id='gCBJ0'></center></pre></bdo></b><th id='gCBJ0'></th></span></q></dt></tr></i><div id='gCBJ0'><tfoot id='gCBJ0'></tfoot><dl id='gCBJ0'><fieldset id='gCBJ0'></fieldset></dl></div>
                  本文介绍了在 Laravel 中同时使用 React.js 和 Vue.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我真的很想知道,是否可以在 laravel 中并排使用 react.js 和 vue.js?
                  例如,将 ReactJs 用于管理仪表板,将 VueJs 用于客户端仪表板.我知道使用其中一种在技术上和逻辑上都更好.
                  你怎么认为?我们可以一起使用吗?

                  I really want to know, is it possible to using react.js and vue.js next to each other in a laravel?
                  For Example, use ReactJs for admin dashboard and use VueJs for client dashboard. I know it's technically and logically better to use one of them.
                  What do you think? Can we use them together?

                  推荐答案

                  是的.这绝对是可能的.多语言编程是当今的现实.您可以采取几种方法.最常见的方法是 micro-frontends.

                  Yes. It is definitely possible. Polyglot programming is today's reality. There are a couple of approaches you can take. A most common approach would be that of a micro-frontends.

                  如何实现微前端取决于您!但总的来说,您将在两条不同的路线上提供两种不同的 SPA.您将使用超链接/锚标记来链接这两个应用程序.但是,请注意,做一些成本很高的事情,对于非常大的应用程序和构建它们的团队来说确实意味着.

                  How you implement micro-frontend is up to you! But in general, you will have two different SPA served on two different routes. You will interlink these two applications using hyperlinks/anchor tags. However, note that, doing something that is a big cost and really meant for very large applications and teams building them.

                  有许多叶子组件,如按钮、链接、下拉列表等,您最终将为这两个框架开发和维护它们.将为每个框架重写状态管理、路由、服务.跨框架匹配一致的样式指南是非常痛苦的.

                  There are many leaf components like buttons, links, dropdown, etc. which you will end up developing and maintaining for both frameworks. State management, routing, services will be rewritten for each framework. It is incredibly painful to match consistent style guide across frameworks.

                  现在,如果您真的需要继续使用这种方法,您可以考虑为您的叶组件使用自定义元素.它们应该适用于许多 SPA 框架(请参阅注释).这将帮助您省去重新发明轮子的麻烦.

                  Nowadays, if you really need to go ahead with this approach, you can consider using custom-elements for your leaf components. They should work for many SPA frameworks (see the notes). This will help you save the trouble of reinventing the wheel.

                  注意:React 对 web 组件不是很友好.它在许多高级测试上都失败了.

                  Note: React is not very friendly with web-components. It fails on many advanced tests.

                  这篇关于在 Laravel 中同时使用 React.js 和 Vue.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何将值从后端传递到 React 前端并在 CSS 中将该值用于前端? 下一篇:如何仅使用stroke-dasharray而不是stroke-dashoffset绘制饼图

                  相关文章

                  <tfoot id='Jd0u9'></tfoot>
                    <legend id='Jd0u9'><style id='Jd0u9'><dir id='Jd0u9'><q id='Jd0u9'></q></dir></style></legend>

                    <i id='Jd0u9'><tr id='Jd0u9'><dt id='Jd0u9'><q id='Jd0u9'><span id='Jd0u9'><b id='Jd0u9'><form id='Jd0u9'><ins id='Jd0u9'></ins><ul id='Jd0u9'></ul><sub id='Jd0u9'></sub></form><legend id='Jd0u9'></legend><bdo id='Jd0u9'><pre id='Jd0u9'><center id='Jd0u9'></center></pre></bdo></b><th id='Jd0u9'></th></span></q></dt></tr></i><div id='Jd0u9'><tfoot id='Jd0u9'></tfoot><dl id='Jd0u9'><fieldset id='Jd0u9'></fieldset></dl></div>
                      <bdo id='Jd0u9'></bdo><ul id='Jd0u9'></ul>

                      <small id='Jd0u9'></small><noframes id='Jd0u9'>