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

🔨 yarn workspaces #96

Merged
merged 10 commits into from
Oct 15, 2018
Merged

🔨 yarn workspaces #96

merged 10 commits into from
Oct 15, 2018

Conversation

fabienjuif
Copy link
Member

@fabienjuif fabienjuif commented Oct 12, 2018

fixes #92
fixes #91
related to #83

TODOs

  • upgrade examples dependencies (other PR)
  • add jest at root level
  • test code in other project via link
  • update README (split them)
  • add size badge for both 'full' and 'core' packages (other PR since we don't bundle lib right now)
  • circleci
  • split tests between core and full

@coveralls
Copy link

coveralls commented Oct 12, 2018

Pull Request Test Coverage Report for Build 227

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.4%) to 98.649%

Totals Coverage Status
Change from base Build 217: 1.4%
Covered Lines: 89
Relevant Lines: 89

💛 - Coveralls

this.setState({
loaded: !this.state.loaded,
})
this.setState(state => ({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using setState this way ? The other one is shorter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I rely on previous state value.
This way I am sure that I have the last state when the setState take place.

Functional setState is better than object IMO

@@ -117,7 +117,7 @@ export default (
render() {
const { props } = this.state
if (isInError(this.props, this.state, this.context)) {
return <ErrorIndicator {...props} />
return ErrorIndicator === undefined ? null : <ErrorIndicator {...props} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the code below doesn't work?

ErrorIndicator && <ErrorIndicator {...props} />

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... I don't know what happens 😱

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ho I see right know why I did this:

  • react render nothing if you return null but not undefined

@fabienjuif fabienjuif merged commit 2505d5c into master Oct 15, 2018
@fabienjuif fabienjuif deleted the workspace branch October 15, 2018 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

fix peer dependencies warnings split core package and TailSpin
3 participants