Skip to content

bit-demos/data-fetching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Fetching in Bit

Example on how to use a hook to fetch data in Bit.

ScreenFlow.mp4

Components are hosted here

If you would like to import(clone) the project to take it for a test run make sure you have bit installed.

npm i -g @teambit/bvm
bvm install

Note: You can also use git to clone this project and test it out. However if you want to use this as a base project that you can then export to your own remote scope use the method below.

Create an empty workspace. (skip this step if you want to import the components into an already created workspace)

bit new react my-workspace --empty

Use the bit import command to import all components into your workspace. This is similar to cloning a project.

bit import "learn-bit-react.data-fetching/*"

Copy the workspace.jsonc file from this repository and replace the one in your workspace. This will ensure you have the correct dependencies and environments set.

Start the dev server

bit start

You should now see all the ecommerce components on localhost:3000

About

Example of data fetching in Bit with React hooks and the fetch API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published