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

Add JS/TS or CJS/ESM examples to the website #4597

Open
noomorph opened this issue Oct 3, 2024 · 0 comments
Open

Add JS/TS or CJS/ESM examples to the website #4597

noomorph opened this issue Oct 3, 2024 · 0 comments

Comments

@noomorph
Copy link
Collaborator

noomorph commented Oct 3, 2024

Describe your idea

The website often operates with CommonJS examples, and since the CJS require imports are falling out of the fashion (well, actually... already did 😆 ), I guess it is highly advisable to make Detox website more informative and suggest some some sort of tabs, e.g.:

JS (or CommonJS):

const jestExpect = require('expect').default;

TS (or ES Modules):

import jestExpect from 'expect';

I'm unsure which dichotomy will be better for now, but the end-goal is to suggest both require and import ways in the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant