JSPM

react-tinacms

0.9.20-alpha.3
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 30
    • Score
      100M100P100Q16256F
    • License Apache-2.0

    Package Exports

    • react-tinacms

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-tinacms) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    react-tinacms

    The react-tinacms package provides helpers for using Tina in React applications

    Tina is a lightweight but powerful toolkit for creating a site editing ui with javascript components. Tina surfaces superpowers for dev’s to create, expand on and customize a simple yet intuitive ui for editing content.

    Tina is optimized for nextgen JAMstack tools. It is based in javascript and is extensible enough to be configured with many different frameworks. Right now we have explored using Tina with Gatsby, Create-React-App & Next.js, with plans to dive into Vue.

    Visit the website to learn more!

    Install

    npm install --save react-tinacms

    or

    yarn add react-tinacms

    Getting Started

    import * as React from 'react'
    import { CMS } from 'tinacms'
    import { CMSContext } from 'react-tinacms'
    
    let cms = new CMS()
    
    function MyApp() {
      let cms = useCMS()
    
      return (
        <div>
          <ul>
            {cms.forms.all().map(form => {
              return <li key={form.name}>{form.name}</li>
            })}
          </ul>
        </div>
      )
    }
    
    React.render(
      <CMSContext.Provider value={cms}>
        <MyApp />
      </CMSContext.Provider>,
      document.body
    )