Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

React branch update with hooks - New react/typescript branch? #276

Open
cvolant opened this issue Oct 28, 2019 · 5 comments
Open

React branch update with hooks - New react/typescript branch? #276

cvolant opened this issue Oct 28, 2019 · 5 comments

Comments

@cvolant
Copy link

cvolant commented Oct 28, 2019

I searched several times for a good example app using meteor and react hooks, but the only meteor/react app I have ever found is this one and it doesn't use hooks yet.
I think it is important since hooks is a major update of React, and updating meteor ecosystem to make it more attractive in a hot topic.
Now that meteor supports typescript, it would also be good to open a typescript branch to showcase a meteor-typescript app.
I could try to PR an update to React 16.10 with hooks and to open a react/typescript branch on top of it since I went through this process on my little app.

@filipenevola
Copy link
Collaborator

Hi @cvolant sure, please open your PR and let's do it.

@cvolant
Copy link
Author

cvolant commented Nov 1, 2019

I now have a working branch that updates everything, transforms all class components into functional components, creates a simple hook-handled global state, fixes some issues (menu, not-found), improve PropTypes, BUT... breaks tests. :(

I searched for a solution a whole day without success: I am tired of it, and I have others things to do. Testing in Meteor already wasn't very documented long ago, and there isn't any other new documentation since then, so now it is both scarce and outdated... It would be great to be able to use react-testing-library...

Do you think I should submit the PR and then we try to fix the problem, or we first need to fix the problem?
If anyone wants to try, here it is:
https://github.com/cvolant/todos/tree/react-update-all+move-to-functional-components-with-hooks

@filipenevola
Copy link
Collaborator

@cvolant please submit the PR then we can work together in the testing part. Sound good?

@cvolant
Copy link
Author

cvolant commented Nov 6, 2019

@filipenevola OK then here it is: #277
If you can have a look at the tests, that would be great. I tried mounting, shallowing, rendering the ListHeader, but no luck, I keep running into errors no matter what I try with each of them...

@cvolant
Copy link
Author

cvolant commented Nov 11, 2019

I improved the PR thanks to HorusGoul review. The tests are still broken, but it is better.
The server tests all pass, but 3 of the client tests fail, I don't know why...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants