Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the benefits of using react-router over kadira:flow-router for meteor

I am new to meteor and react. I have been searching for the best practices for developing my voting-based project with meteor and react. One of the problems I tried to find on internet is pros and cons of using one of two options for router in meteor.

kadira:flow-router seems pretty straightforward to implement, but I see lots of projects on github implementing react-router instead.

Any idea about the comparison of both router packages for meteor ?

like image 229
FurkanO Avatar asked Apr 11 '16 05:04

FurkanO


People also ask

Why use react router DOM instead of react router?

If you are working on a web application, the better option is to use react-router-dom, because it contains all the necessary common components and features essential for routing in a web application.

What is the purpose of react router?

React Router is a standard library for routing in React. It enables the navigation among views of various components in a React Application, allows changing the browser URL, and keeps the UI in sync with the URL.

What are the benefits of client-side routing?

Client-side routing allows you to have unique URLs for each View, but will also make the app work faster—instead of needing to download an entire brand new page from the server, you only need to download the requisite extra data (e.g., using an AJAX request), with much of the other content (the HTML, CSS, etc) already ...

What are the main features of react router?

ReactJS Router is mainly used for developing Single Page Web Applications. React Router is used to define multiple routes in the application. When a user types a specific URL into the browser, and if this URL path matches any 'route' inside the router file, the user will be redirected to that particular route.


1 Answers

If you focus on Meteor with React, I recommend flow-router.
If not, choose react-router or redux-router(for redux).

I have to say, react-router use a lot of skills with react concept, like writing router JSX component and use context to dispatch its url params. If you try to go deep, you will learn more about react itself. That will help you construct app beyond Meteor, and is why I recommend react-router.

like image 86
jackypan1989 Avatar answered Oct 06 '22 06:10

jackypan1989