This file contains hidden or 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
... | |
<Route handler={ require('./main-page') } dataStore={ require('./main-page-data-factory') }> | |
... | |
Router.run(routes, function(err, Handler, state) { | |
let sdata = state.dataStore.getServer(); // Hander.dataStore.getServer() | |
sdata.get().then(funciton(data) { | |
React.renderToString(<Handler data={ data }>); | |
}); | |
}); |
This file contains hidden or 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
" return full path with the trailing slash or empty string | |
fun! s:GetNodeModulesAbsPath () | |
let lcd_saved = fnameescape(getcwd()) | |
silent! exec "lcd" expand('%:p:h') | |
let path = finddir('node_modules', '.;') | |
exec "lcd" lcd_saved | |
" fnamemodify will return full path with trailing slash; | |
" if no node_modules found, we're safe | |
return path is '' ? '' : fnamemodify(path, ':p') |
This file contains hidden or 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
import SwiftUI | |
/// A view that arranges its children in horizontal lines | |
/// | |
/// FlowStack { | |
/// ForEach(1..<100) { num in | |
/// Text(String(num)) | |
/// .padding(8) | |
/// .background(Circle().fill(Color.red)) | |
/// } |