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

Recompose (tougher #1) #5

Open
2 tasks done
matiboy opened this issue Aug 10, 2017 · 2 comments
Open
2 tasks done

Recompose (tougher #1) #5

matiboy opened this issue Aug 10, 2017 · 2 comments

Comments

@matiboy
Copy link

matiboy commented Aug 10, 2017

  • Make the Counter component a pure functional component
  • use recompose's withHandlers and other utility functions for mapping of props and methods
@mingsterism
Copy link

I built a new counter called Counter1.js
I got most of it working. However, I dont think I'm doing some parts correctly.
Counter1.js

File: Counter1.js
Line 16, 19 : Should be using redux dipatch methods INCREMENT, DECREMENT. I'm currently not using the functions stored in counterReducer1.js

Line 41: For the Value to modify increment, decrement by, I need to access it in state which is on Line 53. However, I wasnt too sure if its using setState to modify state, like a traditional react input field.

Line 48: I believe the entire state is stored in this function. However, am not too sure.

Line 24: This method should not be in this HOC as this is buttonEnhance. I believe it should be in another HOC called inputEnhance

I worked mostly with this problem as once I worked on a particular problem set, I get familar with it and can build on it further, mostly by trial/error and guessing how it worked.

Will work on it further over the weekend.

@matiboy
Copy link
Author

matiboy commented Aug 11, 2017

Great, looking forward to what you can come up with and I'll chip in where I can

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