// state.js // App state definition and helpers export const initialState = { query: '', pokemon: null, loading: false, error: null }; export function cloneState(state) { return JSON.parse(JSON.stringify(state)); }