Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: replace JSX withReact.createElementin mock implementation#2302

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
huextrat wants to merge1 commit intogorhom:master
base:master
Choose a base branch
Loading
fromhuextrat:fix/mock

Conversation

@huextrat
Copy link

@huextrathuextrat commentedJun 4, 2025
edited
Loading

Motivation

Fixing mock from#2265

Problem

The mock implementation in mock.js was using JSX syntax (<Content data={this.data} />), which caused aSyntaxError: Unexpected token '<' on some projects.

This forces users to add@gorhom/bottom-sheet to their JesttransformIgnorePatterns configuration to enable JSX transformation for the mock file:

transformIgnorePatterns:["node_modules/(?!@gorhom/bottom-sheet|...other packages)"]

Solution:

Replaced JSX syntax withReact.createElement(Content, { data: this.data }) in the BottomSheetModal mock component.

This ensures the mock works in all JavaScript environments without requiring JSX transformation

robwalkerco, jerone, and kylebake reacted with hooray emojijerone and kylebake reacted with rocket emoji
@huextrathuextrat changed the titleFix: replace JSX withReact.createElementin mock implementationfix: replace JSX withReact.createElementin mock implementationJun 4, 2025
@gabimoncha
Copy link
Contributor

my bad, i missed this. cc@gorhom

rokkoo reacted with thumbs up emoji

@AlixH
Copy link

Up

@jerone
Copy link

Easy fix. 🚀

rokkoo reacted with thumbs up emoji

@gorhomgorhomforce-pushed themaster branch 2 times, most recently from425b6ec toa123b17CompareAugust 17, 2025 21:39
@rokkoo
Copy link

This works fine!

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@jerone
Copy link

Still relevant. 👍

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@gabimoncha
Copy link
Contributor

don't stale it, cc@gorhom this should be an ez merge

jerone reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@huextrat@gabimoncha@AlixH@jerone@rokkoo

[8]ページ先頭

©2009-2025 Movatter.jp