Explore tweets tagged as #reactcache
@swyx
swyx
7 years
โš› Your Suspense Cache likely already has a Context (. Don't put the Context inside another Context for no reason! (eg if no mutation needed). *react-cache is very extremely unstable so dont use now but this is likely a useful insight
Tweet media one
Tweet media two
Tweet media three
Tweet media four
2
8
37
@andrexish
Andrรฉs Rodrรญguez
6 years
@mikhail_osher @ryanflorence React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED. ๐Ÿคฃ.
0
0
2
@koichik
koichik
2 years
@takepepe ๆฑŽ็”จใฎcacheใฏใ“ใ“ใฃใฝใ„. ๅผ•ๆ•ฐ1ใค1ใคใซใคใ„ใฆMap(ใƒ—ใƒชใƒŸใƒ†ใ‚ฃใƒ–ๅž‹ใฎๅผ•ๆ•ฐ)/WeakMap(ใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใชๅผ•ๆ•ฐ)ใ‚’ๅ…ฅใ‚Œๅญใซใ—ใฆ่พฟใฃใฆใ‚‹ใ‚“ใงใ™ใญ.ใกใ‚‡ใฃใจๅฏŒ่ฑช็š„ใชๆฐ—ใŒใ—ใŸใ‘ใฉใƒชใ‚ฏใ‚จใ‚นใƒˆๅ˜ไฝใงใ™ใใซๆถˆใˆใ‚‹ใ‹ใ‚‰ใ„ใ„ใฎใ‹.
1
0
1
@pellrojanet
PellRoja.net
7 years
react/cache in use #Web #Development #openmovement #PHP
0
0
0
@nocountry4geeks
No Country for Geeks
5 years
๐Ÿ“ข ยกNuevo Post! @_ivanrodri_. nos enseรฑa React data-fetching con Suspense๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป๐Ÿ•ต #react #suspense #fetch #reactcache #javascript ๐ŸŒ๐Ÿ”ฅ aprende a cargar datos asรญncronos de una forma totalmente declarativa โš› @javascriptd @JavaScriptDaily @reactdaily @reactDOM.
0
8
11
@dai_shi
Daishi Kato
2 years
@nkSaraf98 @react @dan_abramov @sebmarkbage I've never used `cache` on server. Maybe we can't? Server is stateless which means dispatcher is not preserved?
2
0
1
@86
86
@86
6 years
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ๐Ÿ˜†
0
0
1
@KrComet
๐Ÿฆ‹ hyeseong.kim
4 years
์ตœ์ดˆ ๋ Œ๋”์— ํฌํ•จ๋˜๋Š” ์บ์‹œ ๋ฐ”์šด๋”๋ฆฌ์—์„œ๋Š” ๋ชจ๋‘ ํ•˜๋‚˜์˜ ์ €์žฅ์†Œ๋ฅผ ์žฌ์‚ฌ์šฉ๋จ. ์ดํ›„ ๋ Œ๋”์—์„œ ์ƒˆ ์บ์‹œ ๋ฐ”์šด๋”๋ฆฌ๊ฐ€ ๋งˆ์šดํŠธ๋˜๊ฑฐ๋‚˜ useCacheRefresh ๊ฐ€ ๋ช…์‹œ์ ์œผ๋กœ ํ˜ธ์ถœ๋œ ๋ฐ”์šด๋”๋ฆฌ์—์„œ๋Š” ์ƒˆ ์ €์žฅ์†Œ๊ฐ€ ์ƒ์„ฑ๋˜๊ณ  ์‚ฌ์šฉ๋จ.
1
0
1
@hnordt
Heliton Nordt
6 years
@sebmarkbage @ryanflorence @dan_abramov @samselikoff @jhooks Data fetching was a bad example, I meat something like ReactCache.push("users", createNewUser()).
0
0
1
@lubieowoce
janka
2 years
@JSTechLead @passle_ flow uses the .js extension, but it's a superset of JS, similar to typescript. example: note the magic "@ flow" comment at the top, the `type` declarations, the generic type params (`<T>`) in function definitions. function params are also type-annotated.
1
0
1
@nkohari
Nate Kohari
6 years
@mjackson I got a good chuckle when I saw this in the React codebase:
0
0
1
@beingbook
ElleMeDit
2 years
react-cache ๊ตฌํ˜„์„ ์ง€๊ธˆ ๋ดค๋Š”๋ฐ, cache ํ•จ์ˆ˜ ์ธ์ž๋“ค์„ serializationํ•ด์„œ ๋น„๊ตํ•˜๋Š”๊ฒŒ ์•„๋‹ˆ๋ผ WeakMap์œผ๋กœ ๋ ˆํผ๋Ÿฐ์Šค ๋น„๊ตํ•˜๋„ค. ์ด๋Ÿฌ๋ฉด react-query์ฒ˜๋Ÿผ ๋ฌด์ง€์„ฑ ์บ์‹œํ‚ค ์“ฐ๋ฉด ์•ˆ๋˜๊ฒ ๋‹ค.
0
1
7
@leog0esger
leogoesger
6 years
@Swizec Thanks! I found this implementation for wrapping promises.
0
0
1
@topheman
Tophe
7 years
Play with spinners and network to better understand React Suspense.๐Ÿท #React #Suspense #ReachRouter #ReactLazy #ReactCache.๐Ÿ” Demo:
0
0
0
@acemarke
Mark Erikson
2 years
Second, a WeakMap-based approach. I _directly_ copied this out of the source for React's experimental cache: . It creates a nested tree of "cache nodes" based on argument references. I just got this working a few minutes ago, so haven't tested extensively.
2
0
3
@JSer_ZANP
jser
3 years
Ok, easier approach to learn React source code might be reading through the test specs #HardcoreReact.
1
0
6
@lihautan
Tan Li Hau ๐Ÿค”
6 years
@Akash940 Yes, if you don't patch the global.fetch, which you shouldnt, it's just a PoC, you can do LRU cache per resource like react-cache does
0
0
0
@koba04
Toru Kobayashi
3 years
The implementation of the `cache` API is interesting. ๐Ÿ‘€ .
1
0
1