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
// А здесь гидратация сработает | |
<template v-if="!loading"> | |
<span /> | |
Sign in | |
</template> | |
<template v-else> | |
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" /> | |
Loading... | |
</template> |
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
// Этот код приведёт к ошибке при гидратации | |
<template v-if="!loading"> | |
Sign in | |
</template> | |
<template v-else> | |
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" /> | |
Loading... | |
</template> | |
... |
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
const path = require('path') | |
const webpack = require('webpack') | |
const PrerenderSPAPlugin = require('prerender-spa-plugin') | |
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer | |
module.exports = { | |
runtimeCompiler: true, | |
configureWebpack: { | |
resolve: { | |
extensions: ['.js'], |
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
#Tested on Python 3.6.5 | |
def make_inversed_graph(graph): | |
inversed_graph = [{} for i in range(len(graph))] | |
for i, node in enumerate(graph): | |
for link in node: | |
inversed_graph[link][i] = node[link] | |
return inversed_graph | |
def find_max_path_for_node(graph, finish_node): |