elias-sundqvist / obsidian-react-components

Write and use React (Jsx) components in your Obsidian notes.
GNU Affero General Public License v3.0
246 stars 18 forks source link

Switch to dev build of react? Unable to see debug messages #31

Open airtonix opened 2 years ago

airtonix commented 2 years ago

/Board.md

```jsx-
<components.Kanban.KanbanBoard />
```

image


/Templates/Components/KanbanCard.md

---
defines-react-components: true
react-components-namespace: components.Kanban
---

```jsx:component:KanbanCard
import styled from 'https://cdn.skypack.com/styled-components/'
```

/Templates/Components/KanbanBoard.md

---
defines-react-components: true
react-components-namespace: components.KanbanBoard
---

```jsx:component:KanbanBoard
import Board from "https://cdn.skypack.dev/@asseinfo/react-kanban";

<Board initialBoard={props.board} />
```

image

image

airtonix commented 2 years ago

ctrl + shift + i 👉🏻 the error:

image

airtonix commented 2 years ago

nvm... I'm a noob.

was missing the return statement.

/Templates/Components/KanbanBoard.md

---
defines-react-components: true
react-components-namespace: components.KanbanBoard
---

```jsx:component:KanbanBoard
import Board from "https://cdn.skypack.dev/@asseinfo/react-kanban";

return <Board initialBoard={props.board} />
```
airtonix commented 2 years ago

Actually...

It would be great to be able to change between the prod and dev builds of react.