Skip to content

Releases: elias-sundqvist/obsidian-react-components

0.0.6

19 Jun 12:00
Compare
Choose a tag to compare

0.0.6 (2021-06-19) Add support for skypack imports, bugfixes

  • Added support for url based imports, such as import styled from 'https://cdn.skypack.com/styled-components/'
    • Example:
  • Improved stability of component loading

0.0.5

22 May 17:46
Compare
Choose a tag to compare

0.0.5 (2021-05-22) Enable dynamic updates of Markdown Rendering component, minor changes

  • Updating the src prop of the Markdown component previously did not cause the component to rerender. This is now fixed.
  • For developers: you can now create a .vault_plugin_dir file containing the path to the plugin in your vault: (e.g. path\to\my\vault\.obsidian\plugins\obsidian-react-components). Then yarn build will automatically copy the compiled files to the correct place. So you only have to reload the plugin in Obsidian to see changes take effect.

0.0.4

20 May 19:54
Compare
Choose a tag to compare

0.0.4 (2021-05-20) Improved Component Loading and Error Handling + useIsPreview

  • Add a new setting to disable component refreshing

    • Useful if re-rendering of components is costly, such as if the component makes API calls.
  • Make component loading more reliable (Resolves issue #13)

  • Significantly improve error handling

    • All errors are rendered as react components. You can click a button in the component to show the error in the console.
  • Add a command to manually refresh components

    • Obsidian React Components: Refresh React Components
  • Replace isPreviewMode with useIsPreview, which check the current pane of the component instead of the currently active component (Resolves issue #12)

    Example:

    const isPreview = useIsPreview()
    if(isPreview) {
      // this only happens if the pane which the component is attached to is in preview mode.
    }

0.0.3

10 May 19:40
Compare
Choose a tag to compare

0.0.3 (2021-05-10) Markdown rendering component, more hooks, and minor fixes

  • Made some minor fixes based on feedback in the community-plugins PR
  • Added a Markdown component, which can be used to render makdown.
    • Usage: `jsx-<Markdown src={"* This is a bullet"}/>`
  • Added obsidian to the component scope
  • Added more hooks: useCallback, useContext, useMemo, useReducer, useRef

0.0.2

09 May 22:27
Compare
Choose a tag to compare

0.0.2 (2021-05-10) New functionality, bug fixes, and refactoring

  • @lucasew Added an isPreviewMode function to the component scope. (PR #5)

    There is a rule that in React you must call the same hooks at every render so early returns are not good.

    The user can easily check if the note is on preview mode inside its component and can return null if it's the case.

  • Components which contain sub-components are now correctly updated when the sub-component code is modified. (PR #11)

  • Users are now warned when creating components with invalid names (PR #10)

0.0.1

03 May 23:50
Compare
Choose a tag to compare

0.0.1 (2021-05-04) First Release

  • Basic functionality of the plugin implemented