DevelopmentLiquid GalaxyNEWSTech

Resium is library of React components for Cesium

Resium brings React’s component lifecycle to Cesium. The relationship between Cesium elements and React’s lifecycle is as follows.

constructor: The Cesium element is initialized (the Cesium element of some components are initialized at mount time).

render: Nothing is rendered, because the object passed to children via React’s context API does not exist in this time.

componentDidMount: The Cesium element is mounted. After this, forceUpdate is called and re-render children.

render: Children of the component are rendered. DOM never be rendered except root components (Viewer and CesiumWidget).

componentDidUpdate: Changed properties of the Cesium element are updated. If “Cesium read only properties” are changed, the Cesium element will be reinitialized.

componentWillUnmount: The Cesium element is unmounted and destroyed.