{"id":3991,"date":"2022-03-24T12:15:10","date_gmt":"2022-03-24T12:15:10","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=3991"},"modified":"2022-05-04T07:57:57","modified_gmt":"2022-05-04T07:57:57","slug":"what-is-react-router","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/","title":{"rendered":"What is React Router ?"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4284 aligncenter\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/reactjs-router.gif\" alt=\"\" width=\"650\" height=\"328\" \/><\/p>\n<ul>\n<li>The standard library used for routing in React refers to React Router.<\/li>\n<li style=\"text-align: justify;\">In react, it permits us to build a single-page web application with navigation without even refreshing the page when the user navigates.<\/li>\n<li style=\"text-align: justify;\">It also allows changing the browser URL and will keep the user interface in sync with the URL.<\/li>\n<li style=\"text-align: justify;\">The component structure for calling the components, using which appropriate information, can be shown in React Router.<\/li>\n<li style=\"text-align: justify;\">Any other compatible routing library would also work with React.<\/li>\n<li style=\"text-align: justify;\">In react-router there are four major components:\n<ul>\n<li style=\"text-align: justify;\"><strong>Browser Router<\/strong><\/li>\n<li style=\"text-align: justify;\"><strong>Routes<\/strong><\/li>\n<li style=\"text-align: justify;\"><strong>Route<\/strong><\/li>\n<li style=\"text-align: justify;\"><strong>Link<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4032 size-full\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/react-router-1.png\" alt=\"\" width=\"880\" height=\"589\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/react-router-1.png 880w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/react-router-1-300x201.png 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/react-router-1-768x514.png 768w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/react-router-1-390x261.png 390w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/react-router-1-820x549.png 820w\" sizes=\"(max-width: 880px) 100vw, 880px\" \/><\/p>\n<p>\u00a0<\/p>\n<p style=\"text-align: justify;\"><strong>\u00a0<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The standard library used for routing in React refers to React Router. In react, it permits us to build a single-page web application with navigation without even refreshing the page when the user navigates. It also allows changing the browser URL and will keep the user interface in sync with the URL. The component structure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16542],"tags":[16719,16720,16721,16724,16723,16722,5258,16725,16730,16726,16727,16728,16729],"class_list":["post-3991","post","type-post","status-publish","format-standard","hentry","category-reactjs","tag-react-router","tag-react-router-example","tag-react-router-link","tag-react-router-switch","tag-react-router-tutorial","tag-react-router-install","tag-router","tag-types-of-routing-in-react-js","tag-what-is-exact-in-react-router","tag-what-is-react-router-dom","tag-what-is-react-router-used-for","tag-what-is-react-router-redux","tag-what-is-switch-in-react-router"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is React Router ? - - React Interview Questions and Answers<\/title>\n<meta name=\"description\" content=\"What is React Router ? - React Interview Questions and Answers - The standard library used for routing in React refers to React Router.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is React Router ? - - React Interview Questions and Answers\" \/>\n<meta property=\"og:description\" content=\"What is React Router ? - React Interview Questions and Answers - The standard library used for routing in React refers to React Router.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-24T12:15:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-04T07:57:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/reactjs-router.gif\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/\"},\"author\":{\"name\":\"webmaster\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\"},\"headline\":\"What is React Router ?\",\"datePublished\":\"2022-03-24T12:15:10+00:00\",\"dateModified\":\"2022-05-04T07:57:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/\"},\"wordCount\":96,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/reactjs-router.gif\",\"keywords\":[\"React Router\",\"react router example\",\"react router link\",\"react router switch\",\"react router tutorial\",\"react-router install\",\"router\",\"types of routing in react js\",\"what is exact in react router\",\"what is react router dom\",\"what is react router used for\",\"what is react-router-redux\",\"what is switch in react router\"],\"articleSection\":[\"ReactJS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/\",\"name\":\"What is React Router ? - - React Interview Questions and Answers\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/reactjs-router.gif\",\"datePublished\":\"2022-03-24T12:15:10+00:00\",\"dateModified\":\"2022-05-04T07:57:57+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"What is React Router ? - React Interview Questions and Answers - The standard library used for routing in React refers to React Router.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/reactjs\\\/what-is-react-router\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/reactjs-router.gif\",\"contentUrl\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/reactjs-router.gif\",\"width\":650,\"height\":328},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\"],\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/webmaster\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is React Router ? - - React Interview Questions and Answers","description":"What is React Router ? - React Interview Questions and Answers - The standard library used for routing in React refers to React Router.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/","og_locale":"en_US","og_type":"article","og_title":"What is React Router ? - - React Interview Questions and Answers","og_description":"What is React Router ? - React Interview Questions and Answers - The standard library used for routing in React refers to React Router.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/","og_site_name":"Wikitechy","article_published_time":"2022-03-24T12:15:10+00:00","article_modified_time":"2022-05-04T07:57:57+00:00","og_image":[{"url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/reactjs-router.gif","type":"","width":"","height":""}],"author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/"},"author":{"name":"webmaster","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"headline":"What is React Router ?","datePublished":"2022-03-24T12:15:10+00:00","dateModified":"2022-05-04T07:57:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/"},"wordCount":96,"commentCount":0,"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/reactjs-router.gif","keywords":["React Router","react router example","react router link","react router switch","react router tutorial","react-router install","router","types of routing in react js","what is exact in react router","what is react router dom","what is react router used for","what is react-router-redux","what is switch in react router"],"articleSection":["ReactJS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/","name":"What is React Router ? - - React Interview Questions and Answers","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/reactjs-router.gif","datePublished":"2022-03-24T12:15:10+00:00","dateModified":"2022-05-04T07:57:57+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"What is React Router ? - React Interview Questions and Answers - The standard library used for routing in React refers to React Router.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/reactjs\/what-is-react-router\/#primaryimage","url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/reactjs-router.gif","contentUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/03\/reactjs-router.gif","width":650,"height":328},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/3991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=3991"}],"version-history":[{"count":4,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/3991\/revisions"}],"predecessor-version":[{"id":4285,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/3991\/revisions\/4285"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=3991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=3991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=3991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}