我想知道是否window
對象傳遞到反應組件合成與否。React合成的窗口對象?
如果不是我假設我需要下面的代碼來確定視
const w = window,
d = document,
documentElement = d.documentElement,
body = d.getElementsByTagName('body')[0],
width = w.innerWidth || documentElement.clientWidth || body.clientWidth,
height = w.innerHeight || documentElement.clientHeight || body.clientHeight
你可能想改變方法名稱,我認爲它開始於小'c' –
@ArchimedesTrajano糟糕。更新。 –
你也注意到它是在它被安裝的時候,但這會抵觸http://stackoverflow.com/questions/19014250/reactjs-rerender-on-browser-resize –