Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any chance of jsx getting implemented #80

Open
pkese opened this issue Jun 12, 2023 · 3 comments
Open

Any chance of jsx getting implemented #80

pkese opened this issue Jun 12, 2023 · 3 comments

Comments

@pkese
Copy link

pkese commented Jun 12, 2023

https://github.com/fable-compiler/Feliz.JSX

Is there any chance that something like the above would be added to Sutil?

@pkese
Copy link
Author

pkese commented Jun 12, 2023

I'm of the opinion, that the F# HTML DSLs are taking away more than they are bringing to the table.

For somebody doing web apps only occasionally, searching for Feliz style CSS selectors is really cumbersome.

Its not where F# really shines and it makes it really hard to sell F# to JS/TS developers used to JSX.
I think there's a market space for a F# web framework with an option of nice JSX integration.

@davedawkins
Copy link
Owner

davedawkins commented Jun 12, 2023

https://github.com/fable-compiler/Feliz.JSX

Is there any chance that something like the above would be added to Sutil?

@alfonsogarciacaro did create support for Sutil and something like this. I need to dig through and find it.

I'm of the opinion, that the F# HTML DSLs are taking away more than they are bringing to the table.

It's a fair criticism. Personally, I value the (degree of) type-safety + intellisense it provides, but then again, it's always out of date and requires constant maintenance to stay up-to-date. With my own projects, I mix the DSLs regularly with *.css stylesheets, and even my DSL CSS code will fall back to Css.custom ("template-grid-rows", "...") etc

Its not where F# really shines and it makes it really hard to sell F# to JS/TS developers used to JSX.
I think there's a market space for a F# web framework with an option of nice JSX integration.

I appreciate the insight and constructive criticism; I will dig out @alfonsogarciacaro 's contribution - I'm hoping it's exactly what you're asking for. If not, it's something very similar

@MattMS
Copy link

MattMS commented Dec 10, 2023

I personally feel that JSX fights against what Sutil helps, which is using the native web vs virtual-DOMs.

By focusing on F# patterns, it allows us to more easily expand things into functions (as a superset of function components) and more quickly/concisely develop pages.
I'll concede there is some learning time, but it is well worth it, and actually educates on proper web standards.

It does take some reset time from the React mindset, but it is totally worth it, since you can pick up any framework to include from there (including React).

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

No branches or pull requests

3 participants