);
}
export default AutorotationExample;
```
--------------------------------
### Development and Build Scripts
Source: https://github.com/kamicodaxe/react-pannellum-next/blob/main/_autodocs/README.md
Use these npm scripts to manage the development server and build the library for distribution.
```bash
npm run dev # Start development server with file watching
npm run build # Build the library for distribution
```
--------------------------------
### Module Graph Explanation
Source: https://github.com/kamicodaxe/react-pannellum-next/blob/main/_autodocs/README.md
Details the entry point of the library and how the main PanoramaViewer component interacts with the Pannellum library and React hooks.
```text
Package Export (index.ts/index.d.ts)
│
└─→ PanoramaViewer (default export)
│
├─→ Uses: pannellum.viewer() global function
├─→ Uses: React hooks (useEffect, useRef)
└─→ Imports: Pannellum CSS/JS/styles
```
--------------------------------
### Using Redux State in Panorama Component
Source: https://github.com/kamicodaxe/react-pannellum-next/blob/main/_autodocs/integration-guide.md
Connect a React component to the Redux store to display panorama data. This example shows how to use `useSelector` to retrieve state and `useDispatch` to dispatch actions.
```typescript
import { useSelector, useDispatch } from 'react-redux';
import PanoramaViewer from 'react-pannellum-next';
function PanoramaContainer() {
const dispatch = useDispatch();
const { imagePath, hotspots, autoRotateSpeed } = useSelector(
(state: RootState) => state.panorama
);
return (