bisbaldk

Results 9 comments of bisbaldk

ended up solving it using !important, wonder if there is any other way? seems like the position is set in in-line style.

> 1. For the birds - it seems some platforms don't support the GPU operations. Will need to look into a fallback solution > 2. Halo might be the same...

> @zejunli does this fiddle work for you? https://jsfiddle.net/z9jdLbre/ > > It might be a hardware issue - if your system doesn't support certain GPU operations. Can you try on...

> @zejunli does this fiddle work for you? https://jsfiddle.net/z9jdLbre/ > > It might be a hardware issue - if your system doesn't support certain GPU operations. Can you try on...

> [react-setStateSync](https://github.com/liubin915249126/react-study/blob/c5b4f537ab35342197fc6a556bcaf50eaa208cb6/src/views/test/state.jsx#L31) 可以参考下这里 我在console里面尝试这样,再往后chain一个then不能拿到最新的state,或者说是这么用的吗?

> ```js > setStateSync(state){ > return new Promise(resolve=>{ > this.setState(state,resolve) > }) > } > ``` 这个本质还是利用了class component中setstate有callback的性质,在函数component中这个方法就不适用了,我帖子里提到的这一种,在函数component中适用吗?

> function component 里面react 提供了 useEffect 可以拿到最新的state 对,假设不能用useeffect,有没有办法把functional component中的setstate promise化?

``` new Promise((resolve) => { resolve(); }).then(() => { setTimeout(() => console.log('in settimeout'), 3000); return 'something' }).then(value => console.log(value)); ``` 在这段代码中settimeout模拟setstate的异步操作,到下一个then,还是没有办法在下一个then拿到更新后的数据。。 > [react-setStateSync](https://github.com/liubin915249126/react-study/blob/c5b4f537ab35342197fc6a556bcaf50eaa208cb6/src/views/test/state.jsx#L31) 可以参考下这里

> [react-setStateSync](https://github.com/liubin915249126/react-study/blob/c5b4f537ab35342197fc6a556bcaf50eaa208cb6/src/views/test/state.jsx#L31) 可以参考下这里 ``` new Promise((resolve, reject) =>{ resolve() }).then(()=>{ this.setState({done:true}) console.log(111, this.state.done) }).then(() => { // 这里可以保证拿到的是新state吗?貌似不能?}); } ```