Skip to content

Commit

Permalink
add common errors to docs (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobySolutions authored Sep 14, 2023
1 parent 2da49b9 commit 1b0ccb1
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
15 changes: 15 additions & 0 deletions website/components/common-error-video.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function CommonErrorVideo() {
return (
<div className="w-[300px] h-[300px] md:w-[500px] md:h-[500px] relative my-4 mx-auto">
<iframe
src="https://player.vimeo.com/video/864599068?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479"
frameBorder="0"
allow="autoplay; fullscreen; picture-in-picture"
style={{ position: 'absolute', top: '0', left: '0', width: '100%', height: '100%' }}
title="Screen_Recording_2023-09-07_at_15.31.10"
></iframe>
</div>
);
}

export default CommonErrorVideo;
1 change: 1 addition & 0 deletions website/pages/docs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"rules": "Rules of Blocks",
"virtualization": "Virtualization",
"common-errors": "Common Errors",
"typescript": "Usage with TypeScript",
"internals": "Internals"
}
31 changes: 31 additions & 0 deletions website/pages/docs/common-errors.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: 'Common Errors With Million.js Integration'
description: 'How to overcome common errors when using Million.js with other technologies'
---

import { Callout } from 'nextra-theme-docs';
import CommonErrorVideo from '../.././components/common-error-video';

# Common Errors

You are probably here because you got yelled at by your project after adding Million.js.

For example, something of the sort 👇👇👇

<div>
<CommonErrorVideo />
</div>

The above video happens to be an error raised by someone that wanted to integrate Million into their project.

## MobX Errors

"One of the biggest things in mobx 6 was that they removed decorators "Due to standardized JavaScript limitations
in how class fields are constructed, it is no longer possible for MobX to alter the behavior of class fields by means of decorators or the decorate utility.
Instead, fields have to be made observable by the constructor." - [Nobert Torok](https://github.com/norbertorok92)

### Solution To MobX Error

<Callout type="info">
When using MobX, it is advisable to upgrade to V6 and remove decorators
</Callout>

2 comments on commit 1b0ccb1

@vercel
Copy link

@vercel vercel bot commented on 1b0ccb1 Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sink – ./packages/kitchen-sink

sink-millionjs.vercel.app
sink-git-main-millionjs.vercel.app
million-kitchen-sink-atit.vercel.app
sink.million.dev

@vercel
Copy link

@vercel vercel bot commented on 1b0ccb1 Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

million-kitchen-sink – ./packages/kitchen-sink

million-kitchen-sink-git-main-millionjs.vercel.app
million-kitchen-sink-millionjs.vercel.app
million-kitchen-sink.vercel.app

Please sign in to comment.