README.md in lite-component-1.0.9 vs README.md in lite-component-1.0.10

- old
+ new

@@ -102,9 +102,23 @@ ```erb <%= component("comment_card", collection: @comments, spacer_template: "components/spacer") %> ``` +If you can skip rendering by evaluating complex logic in the `render?` method: + +```ruby +# app/components/alert_component.rb + +class AlertComponent < Lite::Component::Base + + def render? + object.some_complex_check? + end + +end +``` + ### Context All components include `ActionView::Context` which will give you access to request context such as helpers, controllers, etc. It can be accessed using `context` or `c` methods.