简体   繁体   English

ReactJS Relay Modern:选择哪个路由器?

[英]ReactJS Relay Modern: which router to choose?

I'm building a large SaaS CRUD application using ReactJs. 我正在使用ReactJs构建一个大型SaaS CRUD应用程序。 There is a classic navigation need for the whole application, something like the following pattern for every object: 整个应用程序有一个经典的导航需求,类似于每个对象的以下模式:

Item list -> Item detail -> Item edit/delete
    |------> Item create

For every type of object, you can list then or create a new one. 对于每种类型的对象,您可以列出或创建一个新对象。 In the listing, you can see details, edit or delete an item. 在列表中,您可以查看详细信息,编辑或删除项目。 The application will have a top navigation menu that you move you to the object type chosen listing. 该应用程序将有一个顶部导航菜单,您可以将其移动到所选对象类型列表。

In terms of Relay, every object type will hold its query. 就Relay而言,每个对象类型都将保存其查询。 The detailsview will work with the query fragments. 详细信息视图将与查询片段一起使用。

Seems that a simple router would be enough, but I don't want to start using old stuff or deprecated code. 似乎一个简单的路由器就足够了,但我不想开始使用旧的东西或弃用的代码。

As far as I understood, Relay Modern cannot work with React Router V4, although I've seen questions regarding ways to use React Router V4 with Relay Modern. 据我所知,Relay Modern无法使用React Router V4,尽管我已经看到了有关如何将React Router V4与Relay Modern一起使用的问题。 So: 所以:

a) Can I use RRV4 for that type of application ? a)我可以将RRV4用于该类应用吗? Will I have a problem with that? 我有问题吗?

b) If not, should I go for RRV3 or Found ? b)如果没有,我应该选择RRV3还是Found? Which one is recommended ? 推荐哪一个?

You may consider found and found-relay . 您可以考虑找到找到继电器 I am evaluating them now and appreciate that found explicitly addresses the problem of request waterfalls with static routes. 我现在正在评估它们并欣赏发现明确解决了带有静态路由的请求瀑布的问题。 Found Relay supports Relay Modern. Found Relay支持Relay Modern。

I don't see why RRV4 wouldn't work with Relay, take whichever router you prefer. 我不明白为什么RRV4不适用于Relay,请选择您喜欢的路由器。 RRV4 seems like a good choice. RRV4似乎是一个不错的选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM