Error:A<Route> is only ever to X
be used as the child of
<Routes> element,never
rendered directly. Please wrap
your <Route> in a <Routes>.
invariant
/Users/z/Desktop/packages/react-
router/index.tsx:19
16lexport type t Location,Path,To,
NavigationType;
171
18function invariant(cond:any,message
string):asserts cond t
> 19 lif(!cond) throw new Error(message);
201
211
22| function warning(cond: any, message:
string):voidt
View compiled
Route
/Users/z/Desktop/packages/react-
router/index.tsx:231
228lexport function Route(
229 -props: PathRouteProps I
LayoutRouteProps I IndexRouteProps
2301):React.ReactElementlnull T
>231 invariant(
2321 false,
2331 A <Route> is only ever to he used
route要放到routes节点下面,tsx完整代码发出来看下