Skip to content

Commit 48b4b70

Browse files
committed
refactor: put fabric support behind a flag
1 parent 1e130ed commit 48b4b70

File tree

1 file changed

+14
-10
lines changed
  • packages/create-react-native-library/src

1 file changed

+14
-10
lines changed

packages/create-react-native-library/src/index.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,20 @@ const TYPE_CHOICES: {
168168
value: 'module-new',
169169
description: NEWARCH_DESCRIPTION,
170170
},
171-
{
172-
title: 'Fabric view with backward compat',
173-
value: 'view-mixed',
174-
description: BACKCOMPAT_DESCRIPTION,
175-
},
176-
{
177-
title: 'Fabric view',
178-
value: 'view-new',
179-
description: NEWARCH_DESCRIPTION,
180-
},
171+
...(process.env.EXPERIMENTAL_FABRIC_ENABLED === '1'
172+
? ([
173+
{
174+
title: 'Fabric view with backward compat',
175+
value: 'view-mixed',
176+
description: BACKCOMPAT_DESCRIPTION,
177+
},
178+
{
179+
title: 'Fabric view',
180+
value: 'view-new',
181+
description: NEWARCH_DESCRIPTION,
182+
},
183+
] as const)
184+
: []),
181185
];
182186

183187
const args: Record<ArgName, yargs.Options> = {

0 commit comments

Comments
 (0)