Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed tag slots mapping issue with old fibers.
- Move update source related constants to config file. - Code refactor - Fixed issue with cloning children fiber in cloneChildren fiber. - Fix transition issue related to update pending state. - New approach to handle Suspense with transition.
- Loading branch information
Showing
22 changed files
with
325 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
import Brahmos, { Component, createPortal, useState } from '../src'; | ||
|
||
class Child extends Component { | ||
componentWillUnmount () { | ||
console.log('unmounted'); | ||
componentWillUnmount() { | ||
// console.log('unmounted'); | ||
} | ||
|
||
render () { | ||
return (<div>Hello New Root!</div>); | ||
render() { | ||
return <div>Hello New Root!</div>; | ||
} | ||
} | ||
|
||
function CreatePortalExample () { | ||
function CreatePortalExample() { | ||
const [display, setDisplay] = useState(true); | ||
return (<div> | ||
{display && createPortal(<Child/>, document.querySelector('#another-root'))} | ||
<button onClick={() => { setDisplay(false); }}>Hide</button> | ||
</div>); | ||
return ( | ||
<div> | ||
{display && createPortal(<Child />, document.querySelector('#another-root'))} | ||
<button | ||
onClick={() => { | ||
setDisplay(false); | ||
}} | ||
> | ||
Hide | ||
</button> | ||
</div> | ||
); | ||
} | ||
|
||
export default CreatePortalExample; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.