Skip to content

Conversation

@joelmoss
Copy link
Contributor

@joelmoss joelmoss commented Nov 1, 2025

Just an experiment right now, but I really would like to bring this hook back, as I still have a big need for it, and it is the biggest blocker to me using Phlex 2.

Without this, I will have to create a fork, which I would really, really like to avoid.

More tests are needed against things like caching and the compiler, but this works. Also not benchmarked this at all.

Simple define a process_attributes method in your component(s). Example...

def process_attributes(attrs)
	attrs.tap do |it|
		it[:age] = 48 if it[:name] == 'Joel'
	end
end

Anyway, thoughts? Suggestions? Objections?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant