Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function useRoutes (routes) {
const [rid] = useState(Math.random().toString())
const setter = useState(0)[1]
let stackObj = stack[rid]
if (!stackObj) {
stackObj = {
routes: Object.entries(routes),
setter
}
stack[rid] = stackObj
process(rid)
}
console.log(stackObj.component(stackObj.props))
return typeof stackObj.component === 'function'
export function useRoutes (routes) {
const [rid] = useState(Math.random().toString())
const setter = useState(0)[1]
let stackObj = stack[rid]
if (!stackObj) {
stackObj = {
routes: Object.entries(routes),
setter
}
stack[rid] = stackObj
process(rid)
}
console.log(stackObj.component(stackObj.props))
export function useRoutes(routes) {
const id = useState(Symbol())[0]
const setter = useState(0)[1]
let stack = {
routes: Object.entries(routes),
setter
}
routeStack[id] = stack
perfrom(id, true)
return typeof stack.component === 'string'
? push(stack.component)
: stack.component(stack.props)
}
export function useRoutes(routes) {
const id = useState(Symbol())[0]
const setter = useState(0)[1]
let stack = {
routes: Object.entries(routes),
setter
}
routeStack[id] = stack
perfrom(id, true)
return typeof stack.component === 'string'
? push(stack.component)
: stack.component(stack.props)
}