KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
react-travel
★ 8
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
localization-helpers
:
An artisan command package for easy translation management
horse-racing
:
wow, what a race.
opencv_point_cloud_tutorial
:
Introduction to using synchronized RGB and Depth videos to create a point cloud
ncgo
:
ncgo 网络大杂烩工具
sdwriter
:
A command line tool for writing images to SD cards
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
react-travel
?
Download (.md)
## React Travel [](https://badge.fury.io/js/react-travel) [](https://david-dm.org/souporserious/react-travel) Your subtree should be able to travel into another top-level tree. ## Example ```js <Travel onMount={node => { return( $(node).dialog({ autoOpen: false, close: () => { this.setState({dialogOpen: false}) } }).data('ui-dialog') ) }} onUpdate={dialog => { if(dialogOpen) { dialog.open() } else { dialog.close() } }} > <div> Even works with third party dialogs! </div> </Travel> ``` ## Props #### `to`: PropTypes.any What node the portal is rendered to, defaults to `document.body`. #### `tag`: PropTypes.string What tag to use for the portal, defaults to `div`. #### `id`: PropTypes.string React id prop. #### `className`: PropTypes.any React className prop. #### `style`: PropTypes.object React style prop. Accepts an object of styles that are applied to the portal. Note that values require their respective unit applied i.e `style={{padding: '12px'}}`. #### `children`: PropTypes.element Accepts a single React element or component. #### `onMount`: PropTypes.func #### `onUpdate`: PropTypes.func #### `onUnmount`: PropTypes.func All tie into React's life cycle methods. Returns portal node with any work done to it.