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

feat: allow flexible block usage #380

Merged
merged 7 commits into from
Jun 7, 2023
Merged

Conversation

aidenybai
Copy link
Owner

@aidenybai aidenybai commented Jun 2, 2023

Please describe the changes this PR makes and why it should be merged:

This PR introduces compatibility for inline functions in block().

For example:

const HelloBlock = block(function Hello() {
	return <div>HELLO</div>
});

Status

  • Code changes have been tested against prettier, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the codebase
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
    • This PR changes the internal workings with no modifications to the external API (bug fixes, performance improvements)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@coveralls
Copy link

coveralls commented Jun 2, 2023

Pull Request Test Coverage Report for Build 5196423642

  • 150 of 1661 (9.03%) changed or added relevant lines in 12 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-5.3%) to 32.051%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/compiler/index.ts 6 7 85.71%
packages/react/constants.ts 8 11 72.73%
packages/compiler/experimental/utils.ts 3 32 9.38%
packages/compiler/react/utils.ts 17 54 31.48%
packages/compiler/plugin.ts 39 83 46.99%
packages/compiler/experimental/render.ts 11 150 7.33%
packages/compiler/react/optimize.ts 20 189 10.58%
packages/compiler/react/visitor.ts 10 221 4.52%
packages/compiler/vdom/visitor.ts 21 269 7.81%
packages/compiler/react/transform.ts 13 643 2.02%
Totals Coverage Status
Change from base Build 5151780854: -5.3%
Covered Lines: 904
Relevant Lines: 2982

💛 - Coveralls

@tobySolutions
Copy link
Contributor

Ooh! Nice addition. Quick question Aiden. How is that you just add these features with ease? I wanna learn how to ship features too.

Teach me sensei! 🙇‍♂️🙇‍♂️

@aidenybai aidenybai merged commit 474fefa into main Jun 7, 2023
3 checks passed
@Qodestackr
Copy link

Ooh! Nice addition. Quick question Aiden. How is that you just add these features with ease? I wanna learn how to ship features too.

Teach me sensei! bowing_manbowing_man

I wanna join you too. Am learning and we can definitely push. Great work!

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

Successfully merging this pull request may close these issues.

None yet

4 participants