Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-live-route
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fukai
react-live-route
Commits
ce1597af
Commit
ce1597af
authored
Apr 16, 2019
by
Wee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: add manually ensurance for dynamic imported component
parent
09be2c1c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
LiveRoute.tsx
src/LiveRoute.tsx
+4
-3
No files found.
src/LiveRoute.tsx
View file @
ce1597af
...
...
@@ -92,9 +92,10 @@ class LiveRoute extends React.Component<PropsType, any> {
}
// get DOM of Route
public
getRouteDom
()
{
public
getRouteDom
=
()
=>
{
let
routeDom
=
ReactDOM
.
findDOMNode
(
this
)
this
.
routeDom
=
routeDom
as
CacheDom
this
.
routeDom
=
(
routeDom
as
CacheDom
)
||
this
.
routeDom
console
.
log
(
this
.
routeDom
)
}
public
hideRoute
()
{
...
...
@@ -258,7 +259,7 @@ class LiveRoute extends React.Component<PropsType, any> {
}
// normal render
const
props
=
{
...
context
,
location
,
match
:
matchOfPath
}
const
props
=
{
...
context
,
location
,
match
:
matchOfPath
,
ensureDidMount
:
this
.
getRouteDom
}
// const props = { history, staticContext, location, match: matchAnyway }
// Preact uses an empty array as children by
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment