Git Product home page Git Product logo

Comments (8)

hyperkinoko avatar hyperkinoko commented on August 10, 2024

Untitled (3)
こういうのを作りたい

from dynamic-document.

hyperkinoko avatar hyperkinoko commented on August 10, 2024

markdownは直接記述のみでうまく動けばOK

from dynamic-document.

hyperkinoko avatar hyperkinoko commented on August 10, 2024

上の図にあるdocumentオブジェクトのイメージです。ただし,名前がdocumentなのはイケてない気がする。(JSのdocumentオブジェクトとかぶりそう・・・)いい感じの名前付けをしてほしいです。

{
  id: hogehoge
  url: パーマリンク的な
  lead: マークダウン
  content: マークダウン
  question: マークダウン
  options:[
    {
      label: 'はい',
      next: 「はい」をクリックしたときに遷移する
             documentオブジェクト
    },
    {
      label: 'はい',
      next: 「はい」をクリックしたときに遷移する
             documentオブジェクト
    },
    {
      label: 'はい',
      next: 「はい」をクリックしたときに遷移する
             documentオブジェクト
    }
  ]
}

from dynamic-document.

yu2799 avatar yu2799 commented on August 10, 2024

@hyperkinoko

markdownは直接記述のみでうまく動けばOK

これよくわかってないんですけど,すでに記述されたmarkdownが表示できればokって解釈で問題ないですか?

ボタンを押すと適切なドキュメントに移動する。 ボタンは見た目だけで,実質リンクでOK(onClickにする必要なし)

  • modelの作成(Reactのお作法がわからないんですが,MVCでいうところのmodelと理解してください)
  • modelにデータを突っ込むと,そのとおりに遷移して,データ通りのmdが表示される

ボタンを押したら,その遷移先となるurlをオブジェクトから取得して遷移させるといった処理がmodelって解釈で問題ないですか?

from dynamic-document.

hyperkinoko avatar hyperkinoko commented on August 10, 2024

@yu2799

これよくわかってないんですけど,すでに記述されたmarkdownが表示できればokって解釈で問題ないですか?

オブジェクトに直接マークダウンが記述されている状態のことです。例えば以下のような。

{
  id: hogehoge,
  url: パーマリンク的な,
  lead: 'これは**リード文**です',
  content: `Just a link: https://reactjs.com.
  ~~取り消し線~~
  * [ ] hoge
  * [x] piyo
  `,
  question: `## 質問
ほげほげにこたえてください
`,
  options:[
    {
      label: 'はい',
      next: 「はい」をクリックしたときに遷移する
             documentオブジェクト
    },
    {
      label: 'はい',
      next: 「はい」をクリックしたときに遷移する
             documentオブジェクト
    },
    {
      label: 'はい',
      next: 「はい」をクリックしたときに遷移する
             documentオブジェクト
    }
  ]
}

from dynamic-document.

hyperkinoko avatar hyperkinoko commented on August 10, 2024

@yu2799

ボタンを押したら,その遷移先となるurlをオブジェクトから取得して遷移させるといった処理がmodelって解釈で問題ないですか?

処理はmodelじゃないので,なんか違うかも・・・?

from dynamic-document.

hyperkinoko avatar hyperkinoko commented on August 10, 2024

@yu2799
Reactで作り始めちゃったので,私Reactのお作法全然知らなくて(読むくらいならできます)
一度ペアプロでもしてみますか?

from dynamic-document.

hyperkinoko avatar hyperkinoko commented on August 10, 2024

思った以上によくできてる!!ありがとう!!

from dynamic-document.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.