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

Feedback on missing docs for newcomers #579

Open
nkosi23 opened this issue Sep 3, 2023 · 1 comment
Open

Feedback on missing docs for newcomers #579

nkosi23 opened this issue Sep 3, 2023 · 1 comment

Comments

@nkosi23
Copy link

nkosi23 commented Sep 3, 2023

Hello !

I am a newcomer getting my feet wet on the Fable/Feliz ecosystem and also discovering react (while I have substantial experience writing SPA using other frameworks), so I just wanted to give rapid feedback on the questions that popped up in my mind during my learning and for which I struggled a little to find answers:

  • How to reuse ReactComponent defined in Feliz: while this is a central concept, it is not highlighted in the documentation website and I only figured out how it works by watching this Twitch screencast posted on Youtube by Zaid
  • How to include external CSS styles: while the strongly-typed CSS experience looks pretty cool, i wondered how one would go about styling pseudo-element such as :hover or one of the many and very practical CSS3 selector. Finding this code sample was quite an involved process. I can't find docs on the whole CSS modules concept.

Anyway, the documentation is otherwise awesome and the ability to define the Html Markup of components in a strongly-typed fashion using F# is really inspiring, to the point that I am on the verge of migrating a major project from Angular to Feliz. The only thing annoying me a bit is the use of hashes in URLs, and the fact that changing this behavior seems to require to modify every single click event handler on links.

@MangelMaxime
Copy link
Contributor

Hello @nkosi23,

Regarding CSS modules, if you are interested in using them in Fable, I created an NPM tool which generated the F# code required to use them in a typed manner:

https://www.npmjs.com/package/fable-css-modules

This improve the experience a lot because now, you will have the compiler telling you if a class is available or not.

The only thing annoying me a bit is the use of hashes in URLs, and the fact that changing this behavior seems to require to modify every single click event handler on links.

This is a common complain indeed. Just today, I was thinking perhaps you can register a global listener to all anchor elements in order to override the behaviour only once and avoid doing it manually on each anchor elements.

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

2 participants