message: feat(api): use framework pref for initial usage tab
diff: +import { useLocalStorage } from '../../../local-storage';
  +
  +const [getFramework] = useLocalStorage('ionic-docs:framework');
  +
  export default (props) => {
  const { page } = props;
  const headings = [...page.headings];
  - const usage = renderUsage(page.usage);
  + const usage = renderUsage(page.usage, page.path);
  const properties = renderProperties(page.props);
  const events = renderEvents(page.events);
  const methods = renderMethods(page.methods);
  @@ -65,8 +69,9 @@ export default (props) => {
  );
  };
  -const renderUsage = (usage = {}) => {
  +const renderUsage = (usage = {}, path: string) => {
  const keys = Object.keys(usage);
  + const initialTab = getFramework() ? getFramework().toLowerCase() : null;
  if (!keys.length) {
  return null;
  @@ -77,7 +82,15 @@ const renderUsage = (usage = {}) => {
  <h2 id="usage">
  <a href="#usage">Usage</a>
  </h2>
  - <docs-tabs tabs={keys.join(',')}>
  + <docs-tabs
  + /**
  + * We need the `key` here to ensure that the tabs are
  + * re-created on each page so that the initial tab will
  + * be set during componentWillLoad.
  + */
  + key={path}
  + tabs={keys.join(',')}
  + initial={initialTab}>
  { keys.map(key => <div slot={key} innerHTML={usage[key]}/>) }
  </docs-tabs>
  </section>
  