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

Stateless Typed Components #23

Merged
merged 3 commits into from
Feb 28, 2016
Merged

Stateless Typed Components #23

merged 3 commits into from
Feb 28, 2016

Conversation

ryanluker
Copy link
Owner

  • update typescript to 1.8.2
  • update typings for react
  • add new stateless add fish button component
  • cleanup failing tests

Pretty happy with how supported stateless components are in tsx files!
capture0227

Also nice to see the react dev tools for chrome showing the correct type.
capture0227-2

Resources:
microsoft/TypeScript#5478
https://facebook.github.io/react/docs/reusable-components.html#stateless-functions

Issue: #22

@ryanluker
Copy link
Owner Author

First pass at getting stateless components working in the app. Jest tests are still failing though... @mikekidder
capture0227-1

The jest error around returning null / false was occuring because jest was mocking the new stateless component for us instead of actually rendering it with the fish component
@ryanluker
Copy link
Owner Author

Jest tests passing 🎉 turned out to be the framework was mocking the new stateless component rather then letting the fish component render it.
capture0227-3

@ryanluker
Copy link
Owner Author

@mikekidder thanks for the information around testing stateless components!
completes #22

ryanluker added a commit that referenced this pull request Feb 28, 2016
@ryanluker ryanluker merged commit f816e40 into master Feb 28, 2016
@ryanluker ryanluker deleted the stateless-typed branch February 28, 2016 18:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant