Skip to content

Commit

Permalink
Remove SignalVec
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechu10 committed Apr 6, 2021
1 parent e5bfb75 commit 9466293
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 427 deletions.
18 changes: 3 additions & 15 deletions maple-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

use generic_node::GenericNode;
pub use maple_core_macro::template;
use prelude::SignalVec;

pub mod easing;
pub mod flow;
Expand All @@ -28,6 +27,7 @@ pub mod reactive;
pub mod render;
pub mod utils;

/// Result of the [`template`] macro.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TemplateResult<G: GenericNode> {
node: G,
Expand All @@ -49,18 +49,6 @@ impl<G: GenericNode> TemplateResult<G> {
}
}

/// A [`SignalVec`](reactive::SignalVec) of [`TemplateResult`]s.
#[derive(Clone)]
pub struct TemplateList<T: GenericNode> {
templates: reactive::SignalVec<TemplateResult<T>>,
}

impl<T: GenericNode> From<SignalVec<TemplateResult<T>>> for TemplateList<T> {
fn from(templates: SignalVec<TemplateResult<T>>) -> Self {
Self { templates }
}
}

/// Render a [`TemplateResult`] into the DOM.
/// Alias for [`render_to`] with `parent` being the `<body>` tag.
///
Expand Down Expand Up @@ -123,12 +111,12 @@ pub mod prelude {
pub use crate::noderef::NodeRef;
pub use crate::reactive::{
create_effect, create_effect_initial, create_memo, create_root, create_selector,
create_selector_with, on_cleanup, untrack, Signal, SignalVec, StateHandle,
create_selector_with, on_cleanup, untrack, Signal, StateHandle,
};
pub use crate::render::Render;
#[cfg(feature = "ssr")]
pub use crate::render_to_string;
pub use crate::TemplateResult;
#[cfg(feature = "dom")]
pub use crate::{render, render_to};
pub use crate::{TemplateList, TemplateResult};
}
2 changes: 0 additions & 2 deletions maple-core/src/reactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
mod effect;
mod signal;
mod signal_vec;
mod motion;

pub use effect::*;
pub use signal::*;
pub use signal_vec::*;
pub use motion::*;

/// Creates a new reactive root. Generally, you won't need this method as it is called automatically in [`render`](crate::render()).
Expand Down
318 changes: 0 additions & 318 deletions maple-core/src/reactive/signal_vec.rs

This file was deleted.

Loading

0 comments on commit 9466293

Please sign in to comment.