Git Product home page Git Product logo

cerebral-website's Introduction

Cerebral Website

Current website for Cerebral v2+ moved to monorepo

Website for Cerebral v1 is available here.

cerebral-website's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cerebral-website's Issues

tutorial port?

The instructions for the tutorials say to go to localhost:8080 in your browser to view the application. It seems to actually be running at localhost:3000

Maintain documentation for all Cerebral releases

Rationale

With many API and best practice changes it can be very confusing for users to figure how to do things if they're not on the latest versions of cerebral and related packages. We should maintain documentation and tutorials for all releases of cerebral, so we can always point users to docs for their versions.

This will also help us make changes and releases without confusing or disturbing people who can't always upgrade to the latest.

Implementation Steps

  • create a heroku instance for each version of the website
  • each version will have links (dropdown of version numbers probably) to each heroku instance of the website. Nothing fancy...just point to the heroku url
  • Generate Github markdown docs in SeverController
  • For each instance, map client side document filename (doc_operators) to a specific git commit:
{
  "doc_operators": "https://github.com/cerebral-operators#cdndd33jdfeeed<SHA>
}
  • ServerController will fetch github docs and then render them to an HTML string sent to the client.
  • This allows search to "just work" for each documentation version/instance

collect docs from correspondent github repos

we can make to deploy website from ci. it could collect all docs from correspondent github repos instead of dublicating documentation both on repo and website. it should simplify support docs in actual state.

see bem.info for example

cerebral vs redux

I found the FAQ a bit unhelpful when it comes to the difference between Cerebral and Redux. I think most important thing to highlight would be what Dan said in a Twitter conversation about this very topic: "I guess Redux helps when your data structure is complex but async interaction is not very complex. Cerebral is opposite."

Mention perfomance in Choosing a model

Not even sure how big the performance gain is, but in theory the rendering performance should be better when using immutable model in combination with shouldComponentUpdate and shallow checking.

Content Structure

I had a quick read through the V2 website in Vienna and think that we could maybe improve the content structure. Since I haven't had the time to discuss this on the meetup, I will just post it here as reminder.

  • Get Started
    • Setup
    • Create State (define model)
    • Render State (define view and pull state)
    • Update State (add action chains to controller)
  • Concepts
    • Single state
    • Data flow
    • Actions
    • Chains
    • Signals
  • Advanced (is this really advanced?)
    • Routing
    • Choosing a model layer (immutable or not)
    • Serivces
    • Computed
    • Modules
    • Context Providers
  • Best Practices
    • Folder structure
    • Naming conventions
    • Storing module state
  • API

Workflow notes

So maybe we could make a default rule:

"Never pass props into a Cerebral component. Use signals to trigger state changes and extract state from state store. Only pass props to stateless components"
So then you have statefulcomponents, which gets their props from Cerebral. And then you have stateles components which gets their props from parents
nice separation

type error in markdown/nesting.md

// We just add the chains that puts the application in
// "messagesOpened" state
messageOpened: [...messagesOpened, ...messageOpened]

and

When the user goes to /messages/123 the messagesOpened and messageOpened chain will run.

looks a little strange to me.

At least it's hard to reason about ;)

Show folder structure to new users

To me it's always very helpful to look a frameworks recommended folder structure before reading about whats what. It's an easy way to get an overview of the bits an pieces. When you then later read about them you will already know where it sits in your project :)

Hope this makes sense - I had a bear or two before I took this note.

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.