Initial commit: Basic Yew frontend template
- Set up Cargo.toml with Yew dependencies - Created main.rs entry point - Added basic App component with counter functionality - Included HTML template with styling - Added Trunk.toml for build configuration - Added .gitignore to exclude build artifacts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
		
							
								
								
									
										24
									
								
								src/app.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								src/app.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| use yew::prelude::*; | ||||
|  | ||||
| #[function_component] | ||||
| pub fn App() -> Html { | ||||
|     let counter = use_state(|| 0); | ||||
|     let onclick = { | ||||
|         let counter = counter.clone(); | ||||
|         move |_| { | ||||
|             let value = *counter + 1; | ||||
|             counter.set(value); | ||||
|         } | ||||
|     }; | ||||
|  | ||||
|     html! { | ||||
|         <div> | ||||
|             <h1>{ "Hello Yew!" }</h1> | ||||
|             <p>{ "This is a basic Yew application template." }</p> | ||||
|             <div> | ||||
|                 <button {onclick}>{ "Click me!" }</button> | ||||
|                 <p>{ format!("Counter: {}", *counter) }</p> | ||||
|             </div> | ||||
|         </div> | ||||
|     } | ||||
| } | ||||
							
								
								
									
										8
									
								
								src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								src/main.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| use yew::prelude::*; | ||||
|  | ||||
| mod app; | ||||
| use app::App; | ||||
|  | ||||
| fn main() { | ||||
|     yew::Renderer::<App>::new().render(); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Connor Johnstone
					Connor Johnstone