Skip to content

Commit 7400fee

Browse files
committed
Implement hide/unhide host config methods for Art renderer
1 parent 3bf4896 commit 7400fee

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

packages/react-art/src/ReactARTHostConfig.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -406,21 +406,20 @@ export function commitUpdate(
406406
instance._applyProps(instance, newProps, oldProps);
407407
}
408408

409-
export function hideInstance(instance: Instance): void {
410-
throw new Error('Not yet implemented.');
409+
export function hideInstance(instance) {
410+
instance.hide();
411411
}
412412

413-
export function hideTextInstance(textInstance: TextInstance): void {
414-
throw new Error('Not yet implemented.');
413+
export function hideTextInstance(textInstance) {
414+
// Noop
415415
}
416416

417-
export function unhideInstance(instance: Instance, props: Props): void {
418-
throw new Error('Not yet implemented.');
417+
export function unhideInstance(instance, props) {
418+
if (props.visible == null || props.visible) {
419+
instance.show();
420+
}
419421
}
420422

421-
export function unhideTextInstance(
422-
textInstance: TextInstance,
423-
text: string,
424-
): void {
425-
throw new Error('Not yet implemented.');
423+
export function unhideTextInstance(textInstance, text): void {
424+
// Noop
426425
}

0 commit comments

Comments
 (0)