{"id":75885,"date":"2023-01-25T09:15:00","date_gmt":"2023-01-25T08:15:00","guid":{"rendered":"https:\/\/eiposgrados.com\/?p=75885"},"modified":"2023-01-25T11:05:59","modified_gmt":"2023-01-25T10:05:59","slug":"material-ui-migration-from-v4-to-v5","status":"publish","type":"post","link":"https:\/\/eiposgrados.com\/eng\/blog-desarrollo-web-fullstack\/material-ui-migracion-de-v4-a-v5\/","title":{"rendered":"Material UI: Migration from v4 to v5"},"content":{"rendered":"<p>He <em><strong>framework<\/strong><\/em><strong> <a href=\"https:\/\/mui.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Material UI <\/a><\/strong>It is one of the most used in the bookstore<strong> react<\/strong>. Due to its new update, you need to know how to upgrade from the version <a href=\"https:\/\/v4.mui.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">v4<\/a> to v5. If you follow the right steps, you will not lose your job, you will save time and you will do it in a completely safe way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is the <em>framework <\/em>Material UI?<\/strong><\/h2>\n\n\n\n<p>It&#039;s about a <strong>React UI framework <\/strong>which provides a set of reusable components based on Google Material Design. In this sense, it is designed to facilitate the creation of consistent, responsive and visually appealing interfaces.<\/p>\n\n\n\n<p>Some of his<strong> most notable features<\/strong> <strong>by Material UI<\/strong> are the pre-designed components, the design <em>responsive<\/em>, the theming system and support for internationalization. Thanks to these useful functionalities, it is used by many companies and developers around the world, as it allows agile and simple developments. In this way, it is not necessary to invest as many resources and time as with other frameworks.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"563\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-1024x563.png\" alt=\"Material UI Image\" class=\"wp-image-75977\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-1024x563.png 1024w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-300x165.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-768x422.png 768w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-123x68.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-1536x845.png 1536w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-500x275.png 500w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-800x440.png 800w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-1280x704.png 1280w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-1920x1056.png 1920w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-200x110.png 200w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen.png 2000w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Why migrate from one version to another?<\/strong><\/h2>\n\n\n\n<p>Migrating to v5 is a success, since you will benefit from a <strong>wide variety of improvements and bug fixes<\/strong>. However, the big change that has been implemented is related to the new styles engine, which boosts application performance. This is noticeable in dynamic styles, which results in much smoother and more efficient development.<br><br>Along with the above, the new version can be used without problems in<strong> React 18<\/strong>. Therefore, if you want to take full advantage of this library of <a href=\"https:\/\/eiposgrados.com\/eng\/blog-fullstack-web-development\/what-framework-to-start-with-in-javascript-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">JavaScript<\/a> (which also received some improvements in 2021), it is essential that you carry out the update.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"563\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-1024x563.png\" alt=\"Material UI Image 2\" class=\"wp-image-75983\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-1024x563.png 1024w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-300x165.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-768x422.png 768w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-123x68.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-500x275.png 500w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-800x440.png 800w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-1280x704.png 1280w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2-200x110.png 200w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2023\/01\/material-ui-imagen-2.png 1400w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>How to migrate from v4 to v5?<\/strong><\/h2>\n\n\n\n<p>The first step consists of <strong>update React to its latest version<\/strong> so that the process is not problematic. Also, don&#039;t forget that you must use a browser that supports this Material UI improvement, such as Chrome 90 or Firefox 78. After making these changes, you will be in a position to start the migration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The migration<\/strong><\/h2>\n\n\n\n<p>These are the steps you must follow to carry out the migration:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"1\">\n<li><strong>Update Material UI version<\/strong>. Make sure you have the latest version installed in the project. To check this, run <em>npm install @material-ui\/core<\/em> either <em>yarn add @material-ui\/core<\/em>. With these instructions you will clear up your doubts.<\/li>\n\n\n\n<li><strong>Change imports<\/strong>. In parts of the code where Material UI components are used, update the imports. For example, if you were using <em>import Button from &#039;@material-ui\/core\/Button&#039;<\/em>, now it must be <em>import { Button } from &#039;@material-ui\/core<\/em>\u2018&#039;.<\/li>\n\n\n\n<li><strong>Review the documentation<\/strong>, as this may be different from the previous version. You have to do this step to verify that the components and properties are correct. Otherwise, the framework will not function properly.<\/li>\n\n\n\n<li><strong>Test and debug<\/strong>. Once you have made the necessary changes, test the application you are working on to determine whether or not it is working correctly. If you encounter any problems, review the code and documentation to see if it is in order. If everything has gone well, you will have moved from one version to another in a simple and organic way.<\/li>\n<\/ol>\n\n\n\n<p>He <em><strong>framework<\/strong><\/em>Material UI is reinforced with this new update. During migration from v4 to v5, you may need to make some additional changes. This will depend on how you used the framework, so be careful. If in doubt, you can consult GitHub for precise answers. And, if you need to expand your knowledge, don&#039;t miss this <a href=\"https:\/\/eiposgrados.com\/eng\/programs\/master-in-fullstack-web-development\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Master in Full Stack Web Development<\/strong><\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>The Material UI framework is one of the most used in the React library. Due to its new update, you need to know how to pass... <a title=\"Material UI: Migration from v4 to v5\" class=\"read-more\" href=\"https:\/\/eiposgrados.com\/eng\/blog-desarrollo-web-fullstack\/material-ui-migracion-de-v4-a-v5\/\" aria-label=\"Read more about Material UI: migration from v4 to v5\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":75891,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1149],"tags":[],"class_list":["post-75885","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-desarrollo-web-fullstack"],"acf":[],"_links":{"self":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/75885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/comments?post=75885"}],"version-history":[{"count":0,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/75885\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media\/75891"}],"wp:attachment":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media?parent=75885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/categories?post=75885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/tags?post=75885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}