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

Documentation: update pitfalls section #518

Open
travis-leith opened this issue Oct 24, 2022 · 1 comment
Open

Documentation: update pitfalls section #518

travis-leith opened this issue Oct 24, 2022 · 1 comment

Comments

@travis-leith
Copy link

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

  • solved automagically by later versions of Fable
  • still relevant but should be demonstrated with some other syntax that is available in later versions of Fable

Please remove this ambiguity by one of the following

  • Remove this page
  • Update the page to state that these problems do not exist at all in later versions of Fable
  • Update the page to use the most recent syntax and remove the caveat about Fable 2.x.
  • Something else to make clear how this advice relates to Fable version.

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
Copy link
Contributor

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.

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