React
How we use React in Piximi
Organization
Use the following directory structure for new React components:
Foo/Foo.css.ts
Foo/Foo.stories.tsx
Foo/Foo.test.tsx
Foo/Foo.tsx
Foo/index.tsIf your component has one or more child components, use the following directory structure:
Foo/Bar/Bar.css.ts
Foo/Bar/Bar.stories.tsx
Foo/Bar/Bar.test.tsx
Foo/Bar/Bar.tsx
Foo/Bar/index.ts
Foo/Foo/Foo.css.ts
Foo/Foo/Foo.stories.tsx
Foo/Foo/Foo.test.tsx
Foo/Foo/Foo.tsx
Foo/Foo/index.ts
Foo/index.tsA component shouldn’t publicly export any of their child components. In the previous example, Foo/index.ts should only export Foo:
Cascading Style Sheets (CSS)
Last updated
Was this helpful?