We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have setInterval and Sound play same time in useEffect()
const [road, setRoad] = useReducer((state = {top: 0, left: -265, right: 0, bottom: 0, opacity: 1}, action) => { const newState = {...state} if (action.type === 'moving' && action.param) { if (state.left >= action.param) { newState.left -= 10 } else { setStop(true) } } return newState }); const [play, setPlay] = useState('PAUSED') useEffect(() => { setRoad({type: 'moving}) setPlay('PLAYING') }, [])
const [road, setRoad] = useReducer((state = {top: 0, left: -265, right: 0, bottom: 0, opacity: 1}, action) => { const newState = {...state} if (action.type === 'moving' && action.param) { if (state.left >= action.param) { newState.left -= 10 } else { setStop(true) } } return newState });
const [play, setPlay] = useState('PAUSED')
useEffect(() => { setRoad({type: 'moving}) setPlay('PLAYING') }, [])
sound0: waiting soundmanager2.js:1307 sound0: Buffer state change: 1 soundmanager2.js:1307 sound0: setPosition(0) soundmanager2.js:1307 sound0: playing ♫ soundmanager2.js:1307 sound0: Buffer state change: 0 soundmanager2.js:1307 sound0: waiting soundmanager2.js:1307 sound0: Buffer state change: 1 soundmanager2.js:1307 sound0: playing ♫ soundmanager2.js:1307 sound0: Buffer state change: 0 soundmanager2.js:1307 sound0: setPosition(0) soundmanager2.js:1307 sound0: waiting soundmanager2.js:1307 sound0: Buffer state change: 1 soundmanager2.js:1307 sound0: setPosition(0) soundmanager2.js:1307 sound0: playing ♫ soundmanager2.js:1307 sound0: Buffer state change: 0 soundmanager2.js:1307 sound0: waiting soundmanager2.js:1307 sound0: Buffer state change: 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have setInterval and Sound play same time in useEffect()
const [road, setRoad] = useReducer((state = {top: 0, left: -265, right: 0, bottom: 0, opacity: 1}, action) => { const newState = {...state} if (action.type === 'moving' && action.param) { if (state.left >= action.param) { newState.left -= 10 } else { setStop(true) } } return newState });
const [play, setPlay] = useState('PAUSED')
useEffect(() => { setRoad({type: 'moving}) setPlay('PLAYING') }, [])
The text was updated successfully, but these errors were encountered: