Skip to content

v2.8.1: TypeScript Improvements

Compare
Choose a tag to compare
@molefrog molefrog released this 05 Nov 19:05
  • When route parameters can be inferred from the path, they now have a type of { readonly [k in string]: string | undefined }. This takes into account optional segments that can be undefined #262, thanks @HansBrende
  • Proper typings of Route children: it does not allow mixing render props and other elements together #263, thanks @HansBrende
  • Switch now has less strict type of its children to allow conditional rendering and avoid confusion 8f943ab