pub fn with_capacity(n: usize) -> Self {
        Self {
            value: Arc::new(RwLock::new(Vec::with_capacity(n))),
            tx: Arc::new(RwLock::new(Vec::new())),
        }
    }
/// Declare a StateVec with some initial capacity.
///
/// # Examples
///
/// ```
/// # use valerie::prelude::*;
/// # use valerie::prelude::components::*;
/// # use wasm_bindgen_test::*;
/// # fn ui() -> Node {
/// let vec = StateVec::with_capacity(10);
/// (0..10).for_each(|x| vec.push(StateAtomic::new(x)));
///
/// vec.view(ul!(), |x| li!(x))
/// # .into()
/// # }
/// # wasm_bindgen_test_configure!(run_in_browser);
/// # #[wasm_bindgen_test]
/// # fn run() {
/// #     App::render_single(ui());
/// # }
/// ```
Declare a StateVec with some initial capacity.
Declare a StateVec with some initial capacity .
pub fn with_capacity(n: usize) -> Self {
        Self {
            value: Arc::new(RwLock::new(Vec::with_capacity(n))),
            tx: Arc::new(RwLock::new(Vec::new())),
        }
    }
pub fn with_capacity ( n : usize ) -> Self { Self { value : Arc :: new ( RwLock :: new ( Vec :: with_capacity ( n ) ) ) , tx : Arc :: new ( RwLock :: new ( Vec :: new ( ) ) ) , } }
Declare a StateVec with some initial capacity.
Declare a StateVec with some initial capacity .
n
usize
examples
None
use valerie::prelude::*;
None
use valerie::prelude::components::*;
None
use wasm_bindgen_test::*;
None
fn ui() -> node {
let vec = StateVec::with_capacity(10);
(0..10).for_each(|x| vec.push(StateAtomic::new(x))).


let vec = StateVec :: with_capacity ( 10 ) ; ( 0 .. 10 ) . for_each ( |x| vec . push ( StateAtomic :: new ( x ))) .
.into()
None
}
None
wasm_bindgen_test_configure!(run_in_browser);
None
#[wasm_bindgen_test]
None
fn run() {
None
app::render_single(ui());
None
}
None