Releases: styleguidist/react-styleguidist
Releases · styleguidist/react-styleguidist
v11.0.7
v11.0.6
v11.0.5
v11.0.4
v11.0.3
v11.0.2
v11.0.1
v11.0.0
Breaking changes
TypeScript is supported out of the box
We’ve upgraded react-docgen to 5.0.0, which adds TypeScript support out of the box. The are some limitations, so you may still need react-docgen-typescript — see docs for more details.
(#1500, #1354 by @thecodejack)
Fenced code blocks in Markdown with tags typescript
, ts
and tsx
are rendered as an interactive playground. Use the static
modifier to render only the source code.
(#1543 by @mitsuruog)
Prefer default exports over named exports
When your component has both default and named exports, Styleguidist will use the default export. This is a bug fix but may break some style guides.
import React from 'react';
import styled from 'styled-components';
export const C: React.FC = () => {
...
}
const StyledC = styled(C)``;
export default StyledC;
Remove initialState/setState/state
Use React’s useState
hook instead:
- initialState = { count: 42 };
- <Button onClick={() => setState({ count: state.count + 1 })}>{state.count}</Button>
+ const [count, setCount] = React.useState(42);
+ <Button onClick={() => setCount(count + 1)}>{count}</Button>
(#1501 by @thecodejack)
Drop Node.js 8 support
The minimum supported version on Node.js is 10.
(#1545)