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
534 stars 78 forks source link

Documentation: update pitfalls section #518

Open travis-leith opened 1 year ago

travis-leith commented 1 year ago

It is not clear to me how this advice is out of date.

The documentation states "Applies only to Fable 2.x". This either means that the problems caused by these pitfalls are

Please remove this ambiguity by one of the following

I am happy to raise a PR to this effect if someone can confirm to me (in this issue) the correct action to take.

MangelMaxime commented 1 year ago

Quoting myself from Slack:

They are all still relevant, the advice are not so much dependant on Fable but on how React works.

Also, the third snippet should actually say to use type CounterProps = {| min: int; max: int |} instead of type CounterProps = { min: int; max: int }

The reason, for that is the using an anonymous record will allow React-Refresh / Hot Module Replacement to kicks in otherwise, where with a record you will have a full page reload.

I think removing the text "Applies only to Fable 2.x" + fixing the snippet is enough.