{"id":2265,"date":"2022-01-25T18:22:53","date_gmt":"2022-01-25T18:22:53","guid":{"rendered":"https:\/\/lvboard.infostore.in.ua\/?p=2265"},"modified":"2022-01-25T18:22:53","modified_gmt":"2022-01-25T18:22:53","slug":"migrating-to-react-router-v6-a-complete-guide","status":"publish","type":"post","link":"https:\/\/lvboard.infostore.in.ua\/?p=2265","title":{"rendered":"Migrating to React Router v6: A complete guide"},"content":{"rendered":"\n<p>It may be challenging to transition from React Router v5 to v6, because several changes have altered how things were done in React Router v5. In addition, a number of new features have been introduced, so it is recommended to upgrade to v6 even if the transition will be slightly annoying.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>To upgrade from React Router v5 to v6, you\u2019ll either need to create a new project or upgrade an existing one using npm. React Router v6 also makes extensive use of React Hooks, requiring React v16.8 or above.<\/p>\n\n\n\n<p>In this article, we\u2019ll look at issues with React Router v5, what changed, how to upgrade to v6, and what benefits this upgrade has to offer. In order to follow along, you should be familiar with React Router.<\/p>\n\n\n\n<h2>Issues with React Router v5<\/h2>\n\n\n\n<p>React Router v5 came the close to perfection, but there were still some flaws.<\/p>\n\n\n\n<p>First,&nbsp;<code>history.push()<\/code>&nbsp;does not trigger navigation; it was observed that&nbsp;<code>history.push()<\/code>&nbsp;updated the browser\u2019s url but does not navigate to the path.&nbsp;<a href=\"https:\/\/github.com\/remix-run\/history\/issues\/804\" target=\"_blank\" rel=\"noreferrer noopener\">Learn more about the issue here<\/a>.<\/p>\n\n\n\n<p>Next,&nbsp;<code>push<\/code>&nbsp;and&nbsp;<code>replace<\/code>&nbsp;retain previous&nbsp;<code>search<\/code>&nbsp;and&nbsp;<code>hash<\/code>&nbsp;strings. When the&nbsp;<code>push<\/code>&nbsp;or&nbsp;<code>replace<\/code>&nbsp;method is executed on&nbsp;<code>history<\/code>, the&nbsp;<code>search<\/code>&nbsp;and&nbsp;<code>hash<\/code>&nbsp;strings from the previous routes remain in the new route.&nbsp;<a href=\"https:\/\/github.com\/remix-run\/history\/issues\/814\" target=\"_blank\" rel=\"noreferrer noopener\">Learn more about the issue here<\/a>.<\/p>\n\n\n\n<p>Another issue is that&nbsp;<code>Routes<\/code>&nbsp;queries route paths with the most similar naming instead of with exact naming. For instance, a route name&nbsp;<code>\/test<\/code>&nbsp;would still be called if the browser route is&nbsp;<code>\/<\/code>,&nbsp;<code>\/t<\/code>,&nbsp;<code>\/te<\/code>,&nbsp;<code>\/tes<\/code>, or&nbsp;<code>\/test<\/code>, which is incorrect. Developers have to specify the prop&nbsp;<code>exact<\/code>&nbsp;to strictly query route names.<\/p>\n\n\n\n<p>Finally, defining routes with the same path but optional parameters needs special arrangements. For instance, when defining the route&nbsp;<code>\/games<\/code>&nbsp;and another route with the same name, the parameter&nbsp;<code>\/games\/:id<\/code>&nbsp;is required. Developers need to arrange the definition so the route with the parameter comes first, otherwise the routes don\u2019t work as expected.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ The correct way: Here '\/games' will render 'Games' component but not 'SelectedGame', because it does not have a parameter 'id'. While '\/games\/:id' will render only the 'selectedGame' component\n&lt;Router&gt;\n  &lt;Route path=\"\/games\/:id\" component={SelectedGame} \/&gt;\n  &lt;Route path=\"\/games\" component={Games} \/&gt;\n&lt;\/Router&gt;\n\n\/\/ The wrong way: Here either '\/games' or '\/games\/:id' will render the 'Games' components\n&lt;Router&gt;\n  &lt;Route path=\"\/games\" component={Games} \/&gt;\n  &lt;Route path=\"\/games\/:id\" component={SelectedGame} \/&gt;\n&lt;\/Router&gt;<\/pre>\n\n\n\n<p>The code snippet above illustrates the right and wrong way to order routes that are related by paths or parameters. The first example is the most suitable order, while the second example allows only the route&nbsp;<code>\/games<\/code>&nbsp;to render for any situation where&nbsp;<code>\/games<\/code>&nbsp;has a parameter.<\/p>\n\n\n\n<p>Having considered the issues with React Router v5, we will now discuss how to migrate and what has changed that makes React Router v6 different.<a href=\"https:\/\/blog.logrocket.com\/migrating-react-router-v6-complete-guide\/\"><\/a><\/p>\n\n\n\n<h2>Migrating to React Router v6<\/h2>\n\n\n\n<p>The following sections will teach you how to upgrade to React Router v6 in projects where React Router is already installed, and from scratch.<\/p>\n\n\n\n<h3>Upgrading React Router in a project where it is already installed<\/h3>\n\n\n\n<p>To upgrade the React Router version, open a terminal and navigate to the project directory where you wish to upgrade it.<\/p>\n\n\n\n<p>To see a list of the project\u2019s dependencies, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm ls<\/pre>\n\n\n\n<p>You should see a list like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img src=\"https:\/\/blog.logrocket.com\/wp-content\/uploads\/2021\/12\/react-router-version-indicator.png\" alt=\"List indicating which version of React Router is currently installed\" class=\"wp-image-84165\"\/><\/figure><\/div>\n\n\n\n<p>Although the list generated may not be exactly the one above, if you have React Router installed, you should see the most recent version.<\/p>\n\n\n\n<p>Next, run the following command to initiate an upgrade:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm install react-router-dom@latest\n<\/pre>\n\n\n\n<p>If you execute this command without being connected to the internet, it will fail because some files must be downloaded during the installation. If everything is in order, you should see something similar; in our case, the most recent version is v6.0.2:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img src=\"https:\/\/blog.logrocket.com\/wp-content\/uploads\/2021\/12\/npm-confirmation-upgrade.png\" alt=\"Update confirmation page from npm \" class=\"wp-image-84170\"\/><\/figure><\/div>\n\n\n\n<p>If everything goes well, we should notice that React Router has been updated when we run the&nbsp;<code>npm ls<\/code>&nbsp;command again.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img src=\"https:\/\/blog.logrocket.com\/wp-content\/uploads\/2021\/12\/updated-react-router-list.png\" alt=\"List showing React Router updated to v6\" class=\"wp-image-84172\"\/><\/figure><\/div>\n\n\n\n<h3>Installing React Router from scratch<\/h3>\n\n\n\n<p>First, open a terminal in a project directory where React Router isn\u2019t installed. To install a specific version of React Router, run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm install react-router-dom@[VERSION_TO_BE_INSTALLED]<\/pre>\n\n\n\n<p>Replace&nbsp;<code>[VERSION_TO_BE_INSTALLED]<\/code>&nbsp;with the version you want to install.<\/p>\n\n\n\n<p>Next, run the following code to install the newest version:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm install react-router-dom<\/pre>\n\n\n\n<p>This installation also demands the use of the internet. If the installation went well, you should see something similar to this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img src=\"https:\/\/blog.logrocket.com\/wp-content\/uploads\/2021\/12\/npm-confirmation-react-router-install.png\" alt=\"npm confirmation of react router install\" class=\"wp-image-84177\"\/><\/figure><\/div>\n\n\n\n<h2>What changed?<\/h2>\n\n\n\n<p>It\u2019s important to understand what changed so that we can see why upgrading to React Router v6 is helpful. Note that in certain circumstances, developers will downgrade a program to increase functionality or avoid issues.<\/p>\n\n\n\n<p>We will go through the changes in React Router v5 that one should think about when choosing which version to implement in a project.<\/p>\n\n\n\n<h3>Setting up routes<\/h3>\n\n\n\n<p>We had around three different techniques for generating routes in React Router v5, which caused confusion. They are as follows:<\/p>\n\n\n\n<p>The first technique is to pass the component and path as prop of the&nbsp;<code>Route<\/code>&nbsp;component:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Route path=\"\/games\" component={Games} \/&gt;<\/pre>\n\n\n\n<p>This works well, however we are unable to pass props to the rendered component.<\/p>\n\n\n\n<p>The second is to pass in the component as a child of the&nbsp;<code>Route<\/code>&nbsp;component:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Route path=\"\/games\"&gt;\n&lt;Games count=\u201d10\u201d category=\u201dAction\u201d \/&gt;\n&lt;\/Route&gt;<\/pre>\n\n\n\n<p>We may pass custom props to the component we want to render using this approach.<\/p>\n\n\n\n<p>The third and final technique is to use the&nbsp;<code>render<\/code>&nbsp;prop where a function returns the component to be rendered:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Route path=\"\/games\" render={(props) =&gt; &lt;Games {\u2026props} \/&gt;} \/&gt;<\/pre>\n\n\n\n<p>This also works and lets us to give props to the component we\u2019re rendering. However, it is ambiguous and prone to inaccuracy.<\/p>\n\n\n\n<p>In React Router v6, routes have been simplified to the point that we no longer need to utilize&nbsp;<code>Switch<\/code>&nbsp;to query them. Instead, we utilize a \u201crequired\u201d component called&nbsp;<code>Routes<\/code>, which only searches for routes by name. The&nbsp;<code>*<\/code>&nbsp;character can be used to query using a wildcard.<\/p>\n\n\n\n<p>We then supply the component to be rendered to the&nbsp;<code>Route<\/code>&nbsp;component as&nbsp;<code>element<\/code>&nbsp;props. We can also supply custom props to the components in each route that we wish to render.<\/p>\n\n\n\n<p>The code snippets below demonstrate how to define routes in v6:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Routes&gt;\n  &lt;Route path=\"\/games\" element={&lt;Games \/&gt;} \/&gt;\n  &lt;Route path=\"\/movies\" element={&lt;Movies genre=\"Action\" age=\"13\" \/&gt;} \/&gt;\n&lt;\/Routes&gt; <\/pre>\n\n\n\n<p>You can also use&nbsp;<code>useRoutes<\/code>&nbsp;to query the routes in the app. To do this, we must alter the&nbsp;<code>index.js<\/code>&nbsp;content, where we change the&nbsp;<code>App<\/code>&nbsp;wrapper from&nbsp;<code>React.StrictMode<\/code>&nbsp;to&nbsp;<code>BrowserRouter<\/code>&nbsp;as below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from '.\/App';\nimport { BrowserRouter } from 'react-router-dom'\nReactDOM.render(\n  &lt;BrowserRouter&gt;\n    &lt;App \/&gt;\n  &lt;\/BrowserRouter&gt;,\n  document.getElementById('root')\n);<\/pre>\n\n\n\n<p>Then, in the&nbsp;<code>App.js<\/code>&nbsp;file, we define the routes by performing the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import { Outlet, useRoutes } from 'react-router-dom';\nconst App = () =&gt; {\n  let routes = useRoutes([\n    { \n      path: '\/', \n      element: &lt;div&gt;Hello Index&lt;\/div&gt; \n    },\n    { \n      path: 'games', \n      element: &lt;Games \/&gt;,\n      children: [\n      { \n        path: '', \n        element: &lt;div&gt;Games Index&lt;\/div&gt;\n      },\n      { \n        path: ':id', \n        element: &lt;div&gt;Game Details&lt;\/div&gt;\n      }\n    ]\n  }\n]);\n  return routes;\n}\nexport default App\nconst Games = () =&gt; {\n  return (\n    &lt;div className=\"Games\"&gt;\n      &lt;div&gt;This is the Games pages&lt;\/div&gt;\n      &lt;Outlet \/&gt;\n    &lt;\/div&gt;\n  );\n}<\/pre>\n\n\n\n<p>Here, we imported&nbsp;<code>Outlet<\/code>&nbsp;and&nbsp;<code>useRoutes<\/code>.&nbsp;<code>useRoutes<\/code>&nbsp;allows us to define the routes as an array of objects in which we can specify a&nbsp;<code>path<\/code>, the&nbsp;<code>element<\/code>&nbsp;to be rendered when the path is browsed, and sub-paths.&nbsp;<code>Outlet<\/code>&nbsp;helps us render the child route that matches the current path.<\/p>\n\n\n\n<h3>Redirect to another route<\/h3>\n\n\n\n<p>In React Router v5, we use&nbsp;<code>useHistory()<\/code>&nbsp;to redirect, and as previously mentioned, there have been concerns with this technique.<\/p>\n\n\n\n<p>To implement it, we normally do the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import { useHistory } from \"react-route-dom\";\n\nconst App = () =&gt; {\n  const history = useHistory();\n  const handleClick = () =&gt; {\n    history.push(\"\/home\")\n  }\n  return (\n    &lt;div&gt;\n      &lt;button onClick={handleClick}&gt;Go Home&lt;\/button&gt;\n    &lt;\/div&gt;\n  ) \n}\nexport default App<\/pre>\n\n\n\n<p>In v6, we use&nbsp;<code>useNavigate<\/code>&nbsp;like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import { useNavigate } from \"react-router-dom\";\n\nconst App = () =&gt; {\n  const navigate = useNavigate();\n  const handleClick = () =&gt; {\n    navigate(\"\/home\");\n  }\n  return (\n    &lt;div&gt;\n      &lt;button onClick={handleClick}&gt;Go Home&lt;\/button&gt;\n    &lt;\/div&gt;\n  );\n}\nexport default App<\/pre>\n\n\n\n<p><a href=\"https:\/\/reactrouter.com\/docs\/en\/v6\/upgrading\/v5#use-usenavigate-instead-of-usehistory\" target=\"_blank\" rel=\"noreferrer noopener\">Learn more about redirecting with&nbsp;<code>useNavigate<\/code>&nbsp;instead of&nbsp;<code>useHistory<\/code>.<\/a><\/p>\n\n\n\n<h3>Specifying exact route paths in&nbsp;<code>NavLink<\/code><\/h3>\n\n\n\n<p>In v5, when enforcing an exact path or route, we use the&nbsp;<code>exact<\/code>&nbsp;prop. To implement this we do the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;NavLink to=\"\/index\" exact&gt;Go Home&lt;\/NavLink&gt;<\/pre>\n\n\n\n<p>In v6, we use the&nbsp;<code>end<\/code>&nbsp;prop to ensure exact routes:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;NavLink to=\"\/index\" end&gt;Go Home&lt;\/NavLink&gt;<\/pre>\n\n\n\n<h3>Styling an active&nbsp;<code>NavLink<\/code><\/h3>\n\n\n\n<p>In React Router v5, we use the&nbsp;<code>activeClassName<\/code>&nbsp;or&nbsp;<code>activeStyle<\/code>&nbsp;props to style a&nbsp;<code>NavLink<\/code>&nbsp;that is currently active.<\/p>\n\n\n\n<p>For instance:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;NavLink to=\"\/home\" style={{color: 'black'}} activeStyle={{color: 'blue'}} className=\"nav_link\" activeClassName=\"active\" &gt;Go Home&lt;\/NavLink&gt; <\/pre>\n\n\n\n<p>In v6, we can now use a function with the argument&nbsp;<code>isActive<\/code>&nbsp;to condition the&nbsp;<code>style<\/code>&nbsp;or&nbsp;<code>className<\/code>&nbsp;to be used for an active&nbsp;<code>NavLink<\/code>.<\/p>\n\n\n\n<p>For instance:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;NavLink to=\"\/home\" style={({isActive}) =&gt; ({color: isActive ? 'blue' : 'black'})} className={({isActive}) =&gt; `nav_link${isActive ? \" active\" : \"\"}`} &gt;Go Home&lt;\/NavLink&gt;<\/pre>\n\n\n\n<h3>Use&nbsp;<code>useMatch<\/code>&nbsp;instead of&nbsp;<code>useRouteMatch<\/code><\/h3>\n\n\n\n<p>In v5,&nbsp;<code>useRouteMatch<\/code>&nbsp;was used to create relative subroute paths that matched a particular route.<\/p>\n\n\n\n<p>In v6, we use&nbsp;<code>useMatch<\/code>&nbsp;for this. Using the&nbsp;<code>useMatch<\/code>&nbsp;hook requires a pattern argument and does not accept patterns as an array.<\/p>\n\n\n\n<h2>What was removed?<\/h2>\n\n\n\n<p>In React Router v6, some features are no longer supported, either because they are ambiguous or faulty. So far two features were found to have been removed:<\/p>\n\n\n\n<p>First,&nbsp;<code>usePrompt<\/code>&nbsp;was used to confirm whether a user want to exit a page, when the page is in a state that does not require the user to leave.<\/p>\n\n\n\n<p>Second,&nbsp;<code>useBlocker<\/code>&nbsp;is similar to&nbsp;<code>usePrompt<\/code>, and was used to prevent users from leaving a particular page.<\/p>\n\n\n\n<p>These two feature are similar and gave the same issue. In a situation where a user tries to navigate outside a page and navigation is restricted by either&nbsp;<code>usePrompt<\/code>&nbsp;or&nbsp;<code>useBlocker<\/code>, the URL path changes even though the navigation is prevented.<\/p>\n\n\n\n<p>Although there were issues raised about&nbsp;<code>useBlocker<\/code>&nbsp;and&nbsp;<code>usePrompt<\/code>, the creators are still considering adding them back to v6 after they release a stable version.&nbsp;<a href=\"https:\/\/github.com\/remix-run\/react-router\/issues\/8139#issuecomment-954427837\" target=\"_blank\" rel=\"noreferrer noopener\">Check here for more details<\/a>.<\/p>\n\n\n\n<h2>Benefits of React Router v6 over v5<\/h2>\n\n\n\n<p>It\u2019s pointless to migrate if one version doesn\u2019t offer any advantages over the other. In this section, we\u2019ll talk about the benefits of upgrading from React Router v5 to v6.<\/p>\n\n\n\n<p>One of the most important considerations for developers is the application\u2019s portability. The size of React Router v6 has been reduced significantly compared to previous versions. The difference between v5 and v6 is around 60 percent.<\/p>\n\n\n\n<p>Here is a comparison from&nbsp;<a href=\"https:\/\/bundlephobia.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Bundlephobia<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img src=\"https:\/\/blog.logrocket.com\/wp-content\/uploads\/2021\/12\/bundlephobia-react-router-v5.png\" alt=\"\" class=\"wp-image-84182\"\/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img src=\"https:\/\/blog.logrocket.com\/wp-content\/uploads\/2021\/12\/bundlephobia-react-router-v6.png\" alt=\"\" class=\"wp-image-84184\"\/><\/figure><\/div>\n\n\n\n<p>Compiling and deploying apps will be easier and faster as a result of the size reduction.<\/p>\n\n\n\n<p>In addition, the bulk of the modifications in React Router v6 that we covered are more beneficial and have fewer issues.<\/p>\n\n\n\n<p>As previously mentioned, React Router v6 allows routes to accept components as elements when constructing routes, and pass custom props to components. We may also nest routes and use relative links as well. This helps us prevent or reduce the definition of new routes inside various component files, and it also makes it easy to pass global data to components and props.<\/p>\n\n\n\n<p>When redirecting instead of using&nbsp;<code>useHistory<\/code>&nbsp;(which had issues with updating the URL), the new approach using&nbsp;<code>useNavigate<\/code>&nbsp;has been design to fix the issue of redundant URL. It allows us to set the new route manually (<code>navigate(\"\/home\")<\/code>) instead of updating stale routes (<code>history.push(\"\/home\")<\/code>), which might be a bit ambiguous.<\/p>\n\n\n\n<p>Finally, navigation link&nbsp;<code>NavLink<\/code>&nbsp;allows us to condition active links, which makes our code neater and simpler. Instead of passing two separate props for an active and inactive state. By doing this, we can easily use a ternary operator to condition which style will be affected when a link is active or not.<\/p>\n\n\n\n<h2>Conclusion<\/h2>\n\n\n\n<p>After reading this article, I hope you are able to upgrade your React Router version and restructure your codebases to work seamlessly with React Router v6.<\/p>\n\n\n\n<p>Not only should React Router v5 be upgraded to v6, but Reach Router should be switched to v6 as well.<\/p>\n\n\n\n<p>Regularly upgrade React Router v6 and review the&nbsp;<a href=\"https:\/\/reactrouter.com\/docs\/en\/v6\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>&nbsp;for any changes to stay up-to-date with new releases.<\/p>\n\n\n\n<h2>Full visibility into production React apps<\/h2>\n\n\n\n<p>Debugging React applications can be difficult, especially when users experience issues that are hard to reproduce. If you\u2019re interested in monitoring and tracking Redux state, automatically surfacing JavaScript errors, and tracking slow network requests and component load time,&nbsp;<a href=\"https:\/\/www2.logrocket.com\/react-performance-monitoring\" target=\"_blank\" rel=\"noreferrer noopener\">try LogRocket<\/a>.&nbsp;<a href=\"https:\/\/www2.logrocket.com\/react-performance-monitoring\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><a href=\"https:\/\/www2.logrocket.com\/react-performance-monitoring\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www2.logrocket.com\/react-performance-monitoring\" target=\"_blank\" rel=\"noreferrer noopener\">LogRocket<\/a>&nbsp;is like a DVR for web and mobile apps, recording literally everything that happens on your React app. Instead of guessing why problems happen, you can aggregate and report on what state your application was in when an issue occurred. LogRocket also monitors your app&#8217;s performance, reporting with metrics like client CPU load, client memory usage, and more.<\/p>\n\n\n\n<p>The LogRocket Redux middleware package adds an extra layer of visibility into your user sessions. LogRocket logs all actions and state from your Redux stores.<\/p>\n\n\n\n<p>Modernize how you debug your React apps \u2014&nbsp;<a href=\"https:\/\/www2.logrocket.com\/react-performance-monitoring\" target=\"_blank\" rel=\"noreferrer noopener\">start monitoring for free<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It may be challenging to transition from React Router v5 to v6, because several changes have altered how things were done in React Router v5. In addition, a number of new features have been introduced, so it is recommended to upgrade to v6 even if the transition will be slightly annoying.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[30],"tags":[65,181],"_links":{"self":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/2265"}],"collection":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2265"}],"version-history":[{"count":1,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/2265\/revisions"}],"predecessor-version":[{"id":2266,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/posts\/2265\/revisions\/2266"}],"wp:attachment":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}