Detox icon indicating copy to clipboard operation
Detox copied to clipboard

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

Open noomorph opened this issue 1 year ago • 0 comments

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.

noomorph avatar Oct 03 '24 07:10 noomorph