Zaid-Ajaj / Feliz

A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
https://zaid-ajaj.github.io/Feliz/
MIT License
541 stars 80 forks source link

Feedback on missing docs for newcomers #579

Open nkosi23 opened 1 year ago

nkosi23 commented 1 year ago

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:

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 commented 1 year ago

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.