tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 501HTML 254C 19JavaScript 81414 Sutichaykuna

update landing page

6973276025fedf5dbe9a65fe9a4e300254add410 · ruwaq Emil Sjölander · (7 wata ñawpaq) · tayta 051c5432c · kay commitpi sach'ata qhaway

Semántico sayk'uy

Mana ima sutichaypas t'ikrakurqanchu: qillqalla, yachachiylla utaq willaylla t'ikrakurqan.

1 qillqakuna · +9 −6

diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js
index 0df103153..204f61fb7 100644
--- a/docs/src/pages/index.js
+++ b/docs/src/pages/index.js
@@ -26,23 +26,26 @@ const Code = ({file, lang, children}) => {
 }
 
 const rustSnippet = `
-use stretch::{style::*, node::Node, geometry::Size};
+use stretch::{style::*, node::{Node, Stretch}, geometry::Size};
 
-let node = Node::new(Style {
+let stretch = Stretch::new();
+
+let node = stretch.new_node(Style {
     size: Size { 
         width: Dimension::Points(100.0), 
         height: Dimension::Points(100.0),
     },
     ..Default::default()
-}, vec![]);
+}, vec![]).unwrap();
 
-let layout = node.compute_layout(Size::undefined());
+stretch.compute_layout(node, Size::undefined());
 `.trim();
 
 const jsSnippet = `
-import { Node } from 'stretch-layout';
+import { Allocator, Node } from 'stretch-layout';
 
-const node = new Node({
+const allocator = new Allocator();
+const node = new Node(allocator, {
     width: 100, 
     height: 100, 
 });