Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (34 sloc) 2.38 KB

import Layout from '../../components/layout';

export default Layout;

Learning Base Web

We understand that learning new libraries have their own set of challenges. To help you get started, we are here to help!

Controlled and Uncontrolled components

Most code examples you'll find on the documentation site feature controlled components.

In HTML, form elements such as <input>, <textarea>, and <select> typically maintain their own state and update it based on user input. In React, mutable state is typically kept in the state property of components, and only updated with setState().

We can combine the two by making the React state be the “single source of truth”.

To learn more about these, check out the official React docs on Controlled components and Uncontrolled components.

Most Base Web components are released with both options:

  • Stateful components, to support uncontrolled usage,
  • and the default component, that supports controlled usage.

Your first Base Web example

You can find the simple Base Web application example in the Usage section. It only contains a button.

Your next Base Web example

A more complex application using Base Web can be found here. You can also check how it works on CodeSandbox. It helps you build an application on top of Base Web, step by step.

Next steps

It's time for you to build something on your own! If you got stuck, or if you've built something using Base Web, please let us know. We're happy to help or feature your application on this website!

You can reach us in our Slack channel or through GitHub issues.

Once you have a better understanding of Base Web, we recommend diving into more advanced topics like:

You can’t perform that action at this time.