rux
view_component
rux | view_component | |
---|---|---|
9 | 74 | |
383 | 3,150 | |
- | 0.7% | |
5.8 | 8.9 | |
6 months ago | 11 days ago | |
Ruby | Ruby | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rux
-
RubyJS-Vite
Thanks!
Both! I needed something like JSX, and I found Rux [1] but I had some issues with it, and then I found syntax_tree-haml [2] which gave me an AST that I could transform into Ruby. This is what the transformation looks like: https://gist.github.com/aalin/c0e4b0360a1f84d0283149fe4b2ce6...
I have always liked Haml because it's compact and easy to read.
[1] https://github.com/camertron/rux
[2] https://github.com/ruby-syntax-tree/syntax_tree-haml
- Have you been using ViewComponent. What advantages do you see in it?
-
Gnarly Learnings from March 2023
rux
- Launch HN: Pynecone (YC W23) – Web Apps in Pure Python
- Rux: A JSX-inspired way to render view components in Ruby
-
Don't make me think, or why I switched to Rails from JavaScript SPAs
Check out Rux which is «A jsx-inspired way to render view components in Ruby» [to make HTML on the server]. https://github.com/camertron/rux
view_component
- Things I wish I knew before moving 50K lines of code to React Server Components
-
Supercharged table component built with ViewComponent
When searching for examples of table components built with the ViewComponent gem, I was surprised to find none. After some inquiries, I came across examples that worked like this:
-
More expressive APIs for View Components
View components offer two primary ways to interact with the component: passing arguments to the initializer and using slots:
- Have you been using ViewComponent. What advantages do you see in it?
-
How can I integrate VueJS into a rails 7 application? What is the workflow?
For example, splitting out views into partials? Or the new ViewComponent feature that's becoming quite popular - https://viewcomponent.org/
- Helpers vs Components
-
Vanilla Rails view components with partials | Stanko K.R.
I used to do "pure ruby" approach to that -- but basically wound up realizing I was re-inventing github's view_component. Their design goals were similar enough to what I was trying to do, that it made more sense just to use that, rather than try to re-invent it myself.
-
Gnarly Learnings from March 2023
ViewComponent
- Os benefícios de componentizar as views do Rails
-
Does anyone kind of miss simpler webpages?
The linked one is my Rails implementation, written for ViewComponent. The official version uses Nunjucks.
What are some alternatives?
openapi-typescript-codegen - NodeJS library that generates Typescript or Javascript clients based on the OpenAPI specification
Stimulus - A modest JavaScript framework for the HTML you already have
sdoc - Standalone sdoc generator
turbo-rails - Use Turbo in your Ruby on Rails app
SailsJS - Realtime MVC Framework for Node.js
Tailwind CSS - A utility-first CSS framework for rapid UI development.
Thor - Thor is a toolkit for building powerful command-line interfaces.
cypress-rails - Helps you write Cypress tests of your Rails app
Capybara - Acceptance test framework for web applications
hotwire-rails - Use Hotwire in your Ruby on Rails app
phlex - A framework for building object-oriented views in Ruby.
i18n-tasks - Manage translation and localization with static analysis, for Ruby i18n