Skip to content

Commit

Permalink
Implement hide/unhide host config methods for Art renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
acdlite committed Oct 12, 2018
1 parent cb2f608 commit b64734d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions packages/react-art/src/ReactARTHostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,21 +406,20 @@ export function commitUpdate(
instance._applyProps(instance, newProps, oldProps);
}

export function hideInstance(instance: Instance): void {
throw new Error('Not yet implemented.');
export function hideInstance(instance) {
instance.hide();
}

export function hideTextInstance(textInstance: TextInstance): void {
throw new Error('Not yet implemented.');
export function hideTextInstance(textInstance) {
// Noop
}

export function unhideInstance(instance: Instance, props: Props): void {
throw new Error('Not yet implemented.');
export function unhideInstance(instance, props) {
if (props.visible == null || props.visible) {
instance.show();
}
}

export function unhideTextInstance(
textInstance: TextInstance,
text: string,
): void {
throw new Error('Not yet implemented.');
export function unhideTextInstance(textInstance, text): void {
// Noop
}

0 comments on commit b64734d

Please sign in to comment.