PortalKit: update ViewManager.js to reduce the unuseful parts