beautifully simple isomorphic routing for React projects
MIT License
Minor dependency updates
Published by quantizor over 5 years ago
Refactor component-side of the library to use React's new hook infra and some newer React goodies like React.lazy
. This allowed for many perf optimizations in the code and double-digit % size reduction without losing any features!
npm i react@latest react-dom@latest react-is@latest buttermilk@latest
React.lazy()
(note that this only works in the browser right now because React.Suspense
doesn't work server-side yet.)β
routes: [
{
path: '/',
render: () => React.lazy(() => import('./Home')),
},
{
path: '*',
render: () => NotFound,
},
];
βοΈ
routes: [
{
path: '/',
render: () => import('./Home').then(mdl => mdl.default),
},
{
path: '*',
render: () => NotFound,
},
];
??
Profit!
Published by quantizor about 6 years ago
Fixed the regex & function-based routing paths not being fully set up in the various matching utilities. See https://github.com/probablyup/buttermilk/commit/1f4a21a301b92a01e06efa8740a690feebdae61c for more info if you're interested.
Published by quantizor over 6 years ago
Fixed the CDN build & renamed it to "standalone.js" and "standalone.min.js" since it's being built as an IIFE not a UMD bundle now.
Published by quantizor over 6 years ago
Raised minimum react version to 16.3 & dropped the context polyfill. Should have done this from 1.0, but I don't think anyone is using this yet according to Github's stats, so felt safe enough to change it early.
Also added a new match()
utility. Read up on it in the README!
Published by quantizor over 6 years ago
b9e051e update deps
1160361 add description to package.json
5eef5d8 fix dev warning about prop-types not being installed
b3c4aca fix site display in safari, add homepage entry to package.json
Published by quantizor over 6 years ago
added peer dependencies to package.json
π‘
Published by quantizor over 6 years ago
Fix babel misconfiguration that was breaking the commonjs and esm builds. π
Published by quantizor over 6 years ago
Fixed an issue with all the flat files not being pushed to NPM properly π
Published by quantizor over 6 years ago
The inaugural release! I hope you all love Buttermilk, I had fun making it π