@@ -147,13 +147,13 @@ pub struct Template<G: GenericNode> {
147
147
/// so reactivity here will not work!
148
148
head : TemplateFn < SsrNode > ,
149
149
/// A function that gets the paths to render for at built-time. This is equivalent to `get_static_paths` in NextJS. If
150
- /// `incremental_path_rendering ` is `true`, more paths can be rendered at request time on top of these.
150
+ /// `incremental_generation ` is `true`, more paths can be rendered at request time on top of these.
151
151
get_build_paths : Option < GetBuildPathsFn > ,
152
152
/// Defines whether or not any new paths that match this template will be prerendered and cached in production. This allows you to
153
153
/// have potentially billions of templates and retain a super-fast build process. The first user will have an ever-so-slightly slower
154
154
/// experience, and everyone else gets the beneftis afterwards. This requires `get_build_paths`. Note that the template root will NOT
155
155
/// be rendered on demand, and must be explicitly defined if it's wanted. It can uuse a different template.
156
- incremental_path_rendering : bool ,
156
+ incremental_generation : bool ,
157
157
/// A function that gets the initial state to use to prerender the template at build time. This will be passed the path of the template, and
158
158
/// will be run for any sub-paths. This is equivalent to `get_static_props` in NextJS.
159
159
get_build_state : Option < GetBuildStateFn > ,
@@ -183,7 +183,7 @@ impl<G: GenericNode> Template<G> {
183
183
// Unlike `template`, this may not be set at all (especially in very simple apps)
184
184
head : Rc :: new ( |_: Option < String > | sycamore:: template! { } ) ,
185
185
get_build_paths : None ,
186
- incremental_path_rendering : false ,
186
+ incremental_generation : false ,
187
187
get_build_state : None ,
188
188
get_request_state : None ,
189
189
should_revalidate : None ,
@@ -353,7 +353,7 @@ impl<G: GenericNode> Template<G> {
353
353
}
354
354
/// Checks if this template can render more templates beyond those paths it explicitly defines.
355
355
pub fn uses_incremental ( & self ) -> bool {
356
- self . incremental_path_rendering
356
+ self . incremental_generation
357
357
}
358
358
/// Checks if this template is a template to generate paths beneath it.
359
359
pub fn uses_build_paths ( & self ) -> bool {
@@ -396,9 +396,9 @@ impl<G: GenericNode> Template<G> {
396
396
self . get_build_paths = Some ( val) ;
397
397
self
398
398
}
399
- /// Enables the *incremental generation* strategy with the given function .
400
- pub fn incremental_path_rendering ( mut self , val : bool ) -> Template < G > {
401
- self . incremental_path_rendering = val ;
399
+ /// Enables the *incremental generation* strategy.
400
+ pub fn incremental_generation ( mut self ) -> Template < G > {
401
+ self . incremental_generation = true ;
402
402
self
403
403
}
404
404
/// Enables the *build state* strategy with the given function.
0 commit comments