@@ -6,34 +6,33 @@ Status: accepted
66
77## Context
88
9- Epic Stack uses React Router for routing. React Router is a powerful
10- library, but it can be difficult to debug and visualize the routing
11- in your application. This is especially true when you have a complex
12- routing structure with nested routes, dynamic routes, and you rely
13- on data functions like loaders and actions, which the Epic Stack does.
14-
15- It is also hard to know which routes are currently active
16- (which ones are rendered) and if any if the loaders are triggered
17- when you expect them to be. This can lead to confusion and frustration
18- and the use of console.log statements to debug the routing in your
19- application.
20-
21- This is where the React Router DevTools come in. The React
22- Router DevTools are a set of tools that do all of these things for you.
23-
24- React Router has a set of DevTools that help debug and visualize the
25- routing in your application. The DevTools allow you to see the
26- current route information, including the current location, the matched
27- routes, and the route hierarchy. This can be very helpful when debugging
28- your applications. The DevTools also hook into your server-side by
29- wrapping loaders and actions, allowing you to get extensive
30- information about the data being loaded and the actions being dispatched.
9+ Epic Stack uses React Router for routing. React Router is a powerful library,
10+ but it can be difficult to debug and visualize the routing in your application.
11+ This is especially true when you have a complex routing structure with nested
12+ routes, dynamic routes, and you rely on data functions like loaders and actions,
13+ which the Epic Stack does.
14+
15+ It is also hard to know which routes are currently active (which ones are
16+ rendered) and if any if the loaders are triggered when you expect them to be.
17+ This can lead to confusion and frustration and the use of console.log statements
18+ to debug the routing in your application.
19+
20+ This is where the React Router DevTools come in. The React Router DevTools are a
21+ set of tools that do all of these things for you.
22+
23+ React Router has a set of DevTools that help debug and visualize the routing in
24+ your application. The DevTools allow you to see the current route information,
25+ including the current location, the matched routes, and the route hierarchy.
26+ This can be very helpful when debugging your applications. The DevTools also
27+ hook into your server-side by wrapping loaders and actions, allowing you to get
28+ extensive information about the data being loaded and the actions being
29+ dispatched.
3130
3231## Decision
3332
34- We will add the React Router DevTools to the Epic Stack. The DevTools
35- will be added to the project as a development dependency. The DevTools
36- will be used in development mode only.
33+ We will add the React Router DevTools to the Epic Stack. The DevTools will be
34+ added to the project as a development dependency. The DevTools will be used in
35+ development mode only.
3736
3837The DevTools will be used to enhance the following:
3938
@@ -45,19 +44,18 @@ The DevTools will be used to enhance the following:
45446 . See cache information returned via headers from your loaders
46457 . See which loaders/actions are triggered when you navigate to a route
47468 . and a lot more!
48-
4947
5048## Consequences
5149
5250With the addition of the React Router DevTools, you will not have to rely on
53- console.log statements to debug your routing. The DevTools will provide you
54- with the tools to ship your applications faster and with more confidence.
51+ console.log statements to debug your routing. The DevTools will provide you with
52+ the tools to ship your applications faster and with more confidence.
5553
56- The DevTools will also help you visualize the routing in your application,
57- which can be very helpful in understanding routing in general, and figuring
58- out if your routes are set up correctly.
54+ The DevTools will also help you visualize the routing in your application, which
55+ can be very helpful in understanding routing in general, and figuring out if
56+ your routes are set up correctly.
5957
60- They are not included in the production build by default, so you will not
61- have to worry about them being included in your production bundle.
62- They are only included in development mode, so you can use them without
63- any negative performance impact in production.
58+ They are not included in the production build by default, so you will not have
59+ to worry about them being included in your production bundle. They are only
60+ included in development mode, so you can use them without any negative
61+ performance impact in production.
0 commit comments