@solidjs/router 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.jsx +4 -4
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/components.jsx
CHANGED
|
@@ -61,8 +61,8 @@ export const Routes = (props) => {
|
|
|
61
61
|
root = next[0];
|
|
62
62
|
return next;
|
|
63
63
|
}));
|
|
64
|
-
return (<Show when={routeStates() && root}>
|
|
65
|
-
{
|
|
64
|
+
return (<Show when={routeStates() && root} keyed>
|
|
65
|
+
{route => <RouteContextObj.Provider value={route}>{route.outlet()}</RouteContextObj.Provider>}
|
|
66
66
|
</Show>);
|
|
67
67
|
};
|
|
68
68
|
export const useRoutes = (routes, base) => {
|
|
@@ -78,8 +78,8 @@ export const Route = (props) => {
|
|
|
78
78
|
};
|
|
79
79
|
export const Outlet = () => {
|
|
80
80
|
const route = useRoute();
|
|
81
|
-
return (<Show when={route.child}>
|
|
82
|
-
{
|
|
81
|
+
return (<Show when={route.child} keyed>
|
|
82
|
+
{child => <RouteContextObj.Provider value={child}>{child.outlet()}</RouteContextObj.Provider>}
|
|
83
83
|
</Show>);
|
|
84
84
|
};
|
|
85
85
|
export function A(props) {
|
package/dist/index.js
CHANGED
|
@@ -836,6 +836,7 @@ const Routes = props => {
|
|
|
836
836
|
get when() {
|
|
837
837
|
return routeStates() && root;
|
|
838
838
|
},
|
|
839
|
+
keyed: true,
|
|
839
840
|
children: route => createComponent$1(RouteContextObj.Provider, {
|
|
840
841
|
value: route,
|
|
841
842
|
get children() {
|
|
@@ -864,6 +865,7 @@ const Outlet = () => {
|
|
|
864
865
|
get when() {
|
|
865
866
|
return route.child;
|
|
866
867
|
},
|
|
868
|
+
keyed: true,
|
|
867
869
|
children: child => createComponent$1(RouteContextObj.Provider, {
|
|
868
870
|
value: child,
|
|
869
871
|
get children() {
|