Title: Case Study: Helping with TypeScript problems of react-three-fiber
.
Dan Questions:
-
How will you deliver the idea to the audience?
- R3F is pretty rad. Gonna show this on the first slide.
-
What is the one thing that you want people to take away from your talk?
- Compiler API is powerful. We can use this power to hard solve problems.
-
Why are you giving the talk? What is the emotional core? What do you believe in?
- Don’t be afraid. Contribute to open source. Hack weird stuff.
Format: Case Study.
Outline:
- what is React Three Fiber
- why I care about it
- (past threejs experience in Explain Everything)
- how it works
- what is a reconciler?
- reconciler problem -- conflict with @types/react #233
I generated components for dynamic behavior of r3f by mapping over THREE types, dumping them to a file with Compiler API.- why was it hard in TS
- static clashes with dynamic
- How React Native lies about its types
- Why was traversing the API in JS harder (impossible?)
- why was it hard in TS
- "we obviously had a merge conflict" what leads to the next part of the talk
publishing a TypeScript library with multiple targets #270- missing .d.ts files
- working around slow compilation times
- it isn't hard to write a rollup plugin