diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..9d08a1a828
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 62859ad4b5..0000000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- extends: 'react-tools'
-}
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..5a0d5e480b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto eol=lf
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000000..e2ea8ad3b9
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,3 @@
+# These are supported funding model platforms
+
+github: tannerlinsley
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000000..67bf29eb62
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,100 @@
+name: '🐛 Bug report'
+description: Report a reproducible bug or regression
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thank you for reporting an issue :pray:.
+
+ This issue tracker is for reporting reproducible bugs or regression's found in [react-table](https://github.com/tanstack/table)
+ If you have a question about how to achieve or implement something and are struggling, please post a question
+ inside of react-table's [Discussions tab](https://github.com/tanstack/table/discussions) instead of filing an issue.
+
+ Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already:
+ - TanStack Table's [Discussions tab](https://github.com/tanstack/table/discussions)
+ - TanStack Table's [Open Issues](https://github.com/tanstack/table/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
+ - TanStack Table's [Closed Issues](https://github.com/tanstack/table/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed)
+
+ The more information you fill in, the better the community can help you.
+
+ - type: input
+ id: tanstack-table-version
+ attributes:
+ label: TanStack Table version
+ description: |
+ - Please let us know the exact version of the TanStack Table framework adapter that you were using when the issue occurred. If you are using an older version, check to see if your bug has already been solved in the latest version. Please don't just put in "latest", as this is subject to change.
+ - The latest "table-core" version is
+ placeholder: |
+ e.g. v8.11.6
+ validations:
+ required: true
+
+ - type: input
+ id: framework-library-version
+ attributes:
+ label: Framework/Library version
+ description: Which framework and what version of that framework are you using?
+ placeholder: |
+ e.g. React v17.0.2
+ validations:
+ required: true
+
+ - type: textarea
+ id: description
+ attributes:
+ label: Describe the bug and the steps to reproduce it
+ description: Provide a clear and concise description of the challenge you are running into, and the steps we should take to try to reproduce your bug.
+ validations:
+ required: true
+
+ - type: input
+ id: link
+ attributes:
+ label: Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
+ description: |
+ Please add a link to a minimal reproduction.
+ Note:
+ - Your bug may get fixed much faster if we can run your code and it doesn't have dependencies other than React.
+ - To create a shareable code example for web, you can use CodeSandbox (https://codesandbox.io/s/new) or Stackblitz (https://stackblitz.com/).
+ - Please make sure the example is complete and runnable without prior dependencies and free of unnecessary abstractions
+ - Feel free to fork any of the official CodeSandbox examples to reproduce your issue: https://github.com/tanstack/table/tree/main/examples/
+ - For React Native, you can use: https://snack.expo.dev/
+ - For TypeScript related issues only, a TypeScript Playground link might be sufficient: https://www.typescriptlang.org/play
+ - Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve.
+ placeholder: |
+ e.g. Code Sandbox, Stackblitz, TypeScript Playground, etc.
+ validations:
+ required: true
+
+ - type: textarea
+ id: screenshots_or_videos
+ attributes:
+ label: Screenshots or Videos (Optional)
+ description: |
+ If applicable, add screenshots or a video to help explain your problem.
+ For more information on the supported file image/file types and the file size limits, please refer
+ to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files
+ placeholder: |
+ You can drag your video or image files inside of this editor ↓
+
+ - type: dropdown
+ attributes:
+ options:
+ - No, because I do not know how
+ - No, because I do not have time to dig into it
+ - Maybe, I'll investigate and start debugging
+ - Yes, I think I know how to fix it and will discuss it in the comments of this issue
+ - Yes, I am also opening a PR that solves the problem along side this issue
+ label: Do you intend to try to help solve this bug with your own PR?
+ description: |
+ If you think you know the cause of the problem, the fastest way to get it fixed is to suggest a fix, or fix it yourself! However, it is ok if you cannot solve this yourself and are just wanting help.
+ - type: checkboxes
+ id: agrees-to-terms
+ attributes:
+ label: Terms & Code of Conduct
+ description: By submitting this issue, you agree to follow our Code of Conduct and can verify that you have followed the requirements outlined above to the best of your ability.
+ options:
+ - label: I agree to follow this project's Code of Conduct
+ required: true
+ - label: I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000000..963fe444ec
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,11 @@
+blank_issues_enabled: false
+contact_links:
+ - name: 🤔 Feature Requests & Questions
+ url: https://github.com/TanStack/table/discussions
+ about: Please ask and answer questions here.
+ - name: 💬 Community Chat
+ url: https://discord.gg/mQd7egN
+ about: A dedicated discord server hosted by TanStack
+ - name: 🦋 TanStack Bluesky
+ url: https://bsky.app/profile/tanstack.com
+ about: Stay up to date with new releases of our libraries
diff --git a/.github/pull_request_template b/.github/pull_request_template
new file mode 100644
index 0000000000..2c10bc7d7d
--- /dev/null
+++ b/.github/pull_request_template
@@ -0,0 +1,8 @@
+## 🎯 Changes
+
+
+
+## ✅ Checklist
+
+- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/table/blob/main/CONTRIBUTING.md).
+- [ ] I have tested this code locally with `pnpm test:pr`.
diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml
new file mode 100644
index 0000000000..e3bc82ecfd
--- /dev/null
+++ b/.github/workflows/autofix.yml
@@ -0,0 +1,31 @@
+name: autofix.ci # needed to securely identify the workflow
+
+on:
+ pull_request:
+ push:
+ branches: [main, alpha, beta, rc]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ autofix:
+ name: autofix
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6.0.1
+ with:
+ fetch-depth: 0
+ - name: Setup Tools
+ uses: tanstack/config/.github/setup@main
+ - name: Fix formatting
+ run: pnpm format
+ - name: Apply fixes
+ uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
+ with:
+ commit-message: 'ci: apply automated fixes'
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000000..698c3b0a35
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,55 @@
+name: PR
+
+on:
+ pull_request:
+ paths-ignore:
+ - 'docs/**'
+ - 'media/**'
+ - '**/*.md'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
+ cancel-in-progress: true
+
+env:
+ NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ name: Test
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6.0.1
+ with:
+ fetch-depth: 0
+ - name: Start Nx Agents
+ run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
+ - name: Setup Tools
+ uses: tanstack/config/.github/setup@main
+ - name: Get base and head commits for `nx affected`
+ uses: nrwl/nx-set-shas@v4.4.0
+ with:
+ main-branch-name: main
+ - name: Run Checks
+ run: pnpm run test:pr --parallel=3
+ - name: Stop Nx Agents
+ if: ${{ always() }}
+ run: npx nx-cloud stop-all-agents
+ preview:
+ name: Preview
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6.0.1
+ with:
+ fetch-depth: 0
+ - name: Setup Tools
+ uses: tanstack/config/.github/setup@main
+ - name: Build Packages
+ run: pnpm run build:all
+ - name: Publish Previews
+ run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000000..c44687d853
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,49 @@
+name: Release
+
+on:
+ workflow_dispatch:
+ inputs:
+ tag:
+ description: override release tag
+ required: false
+ push:
+ branches: [main, alpha, beta, rc]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
+ cancel-in-progress: true
+
+env:
+ NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
+
+permissions:
+ contents: write
+ id-token: write
+
+jobs:
+ release:
+ name: Release
+ if: github.repository_owner == 'TanStack'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6.0.1
+ with:
+ fetch-depth: 0
+ - name: Start Nx Agents
+ run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
+ - name: Setup Tools
+ uses: tanstack/config/.github/setup@main
+ - name: Run Tests
+ run: pnpm run test:ci --parallel=3
+ - name: Stop Nx Agents
+ if: ${{ always() }}
+ run: npx nx-cloud stop-all-agents
+ - name: Publish
+ run: |
+ git config --global user.name 'Tanner Linsley'
+ git config --global user.email 'tannerlinsley@users.noreply.github.com'
+ pnpm run cipublish
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ TAG: ${{ inputs.tag }}
diff --git a/.gitignore b/.gitignore
index 2ed1802ff3..003c036732 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,57 @@
-node_modules/
-lib/
-docs/build
-react-table.js
-react-table.css
-*.log
+
+# See https://help.github.com/ignore-files/ for more about ignoring files.
+
+# dependencies
+node_modules
+package-lock.json
+yarn.lock
+
+# builds
+build
+dist
+lib
+es
+artifacts
+.rpt2_cache
+coverage
+*.tgz
+
+# misc
+.DS_Store
+.env
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+.next
+.svelte-kit
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+.history
+size-plugin.json
+stats-hydration.json
+stats-react.json
+stats.html
+.vscode/settings.json
.idea
+
+*.log
.DS_Store
+.cache
+.idea
+.pnpm-store
+
+package-lock.json
+yarn.lock
+*.tsbuildinfo
+*.tsbuildinfo
+
+.svelte-kit
+.nx/cache
+.nx/workspace-data
+vite.config.js.timestamp-*
+vite.config.ts.timestamp-*
+
+.angular
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000000..268c392d3c
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+provenance=true
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000000..b404027604
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+24.8.0
diff --git a/.nx/workflows/dynamic-changesets.yaml b/.nx/workflows/dynamic-changesets.yaml
new file mode 100644
index 0000000000..d3536f3ba7
--- /dev/null
+++ b/.nx/workflows/dynamic-changesets.yaml
@@ -0,0 +1,4 @@
+distribute-on:
+ small-changeset: 3 linux-medium-js
+ medium-changeset: 6 linux-medium-js
+ large-changeset: 10 linux-medium-js
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000000..63dd7224e6
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,12 @@
+**/.nx/
+**/.nx/cache
+**/.svelte-kit
+**/build
+**/coverage
+**/dist
+**/docs
+**/old-examples
+**/examples/**/*.svelte
+pnpm-lock.yaml
+
+.angular
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 04f1d52d7e..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "6"
-script: npm test
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000000..1d7ac851ea
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,3 @@
+{
+ "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 97184ce132..0000000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,119 +0,0 @@
-## 6.7.5
-#### Fixes & Optimizations
-- Now passes `column` to `getResizerProps` (#667)
-- NOTE: `getResizerProps` is now only called if the column is resizable
-- Fixes the `className` ordering in defaultProps for ThComponent (#673)
-- NOTE: user supplied classNames now come at the end so they can extend the defaults
-
-## 6.7.4
-#### Fixes & Optimizations
-- Fix Prop types for columns
-
-## 6.7.3
-#### Fixes & Optimizations
-- Fix the rest of the proptypes
-
-## 6.7.2
-#### Fixes & Optimizations
-- `getPropTypes` proptype check
-
-## 6.7.1
-#### Fixes & Optimizations
-- `eslint-config` moved to dev deps
-
-## 6.7.0
-## 6.7.0-alpha-0
-#### New Features
-- Expose page/pageSize to rows/cells
-- Supply sort direction to custom sort methods
-
-#### Fixes & Optimizations
-- README updates
-- Linter cleanup
-- Added PropTypes node module
-- Deps, linting and style upgrades
-
-## 6.6.0
-#### Fixes & Optimizations
-- moved repo to react-tools
-- Doc examples moved to codesandbox.io
-- README updates
-- CSS refacting for rt-tfoot to match rt-thead
-- CSS more specific for input and select
-
-## 6.5.3
-#### Fixes & Optimizations
-- `onClick` proxying and eslint
-
-## 6.5.2
-#### New Features
-- Provide onClick handleOriginal function - #406
-
-#### Fixes & Optimizations
-- README updates
-- `makePathArray` in utils - #326
-- Various fixes: #294, #376, #398, #415,
-
-## 6.5.1
-#### Fixes & Optimizations
-- `defaultExpanded` now works correctly - #372
-- `column.getProps().rest` props are now applied correctly
-- `makeTemplateComponent` now supports `displayName` - #289
-
-## 6.5.0
-##### New Features
-- `column.filterAll` - defaults to `false`, but when set to `true` will provide the entire array of rows to `filterMethod` as opposed to one row at a time. This allows for more fine-grained filtering using any method you can dream up. See the [Custom Filtering example](https://react-table.js.org/#/story/custom-filtering) for more info.
-
-## 6.4.0
-##### New Features
-- `PadRowComponent` - the content rendered inside of a padding row. Defaults to a react component that renders ` `
-
-## 6.3.0
-##### New Features
-- `defaultSortDesc` - allows you to set the default sorting direction for all columns to descending.
-- `column.defaultSortDesc` - allows you to set the default sorting direction for a specific column. Falls back to the global `defaultSortDesc` when not set at all.
-
-## 6.0.0
-
-##### New Features
-- New Renderers:
- - `Aggregated` - Custom renderer for aggregated cells
- - `Pivot` - Custom renderer for Pivoted Cells (utilizes `Expander` and `PivotValue`)
- - `PivotValue` - Custom renderer for Pivot cell values (deprecates the undocumented `pivotRender` option)
- - `Expander` - Custom renderer for Pivot cell Expander
-- Added custom sorting methods per table via `defaultSortMethod` and per column via `column.sortMethod`
-- Pivot columns are now visibly separate and sorted/filtered independently.
-- Added `column.resizable` to override global table `resizable` option for specific columns.
-- Added `column.sortable` to override global table `sortable` option for specific columns.
-- Added `column.filterable` to override global table `filterable` option for specific columns.
-- Added `defaultExpanded` table option.
-- All callbacks can now be utilized without needing to hoist and manage the piece of state they export. That is what their prop counterparts are for, so now the corresponding prop is used instead of the callback to detect a "fully controlled" state.
-- Prevent transitions while column resizing for a smoother resize effect.
-- Disable text selection while resizing columns.
-
-
-##### Breaking API Changes
-- New Renderers:
- - `Cell` - deprecates and replaces `render`
- - `Header` - deprecates and replaces `header`
- - `Footer` - deprecates and replaces `footer`
- - `Filter`- deprecates and replaces `filterRender`
-- Callbacks now provide the destination state as the primary parameter(s). This makes hoisting and controlling the state in redux or component state much easier. eg.
- - `onSorting` no longer requires you to build your own toggle logic
- - `onResize` no longer requires you to build your own resize logic
-- Renamed `onChange` callback -> `onFetchData` which will always fire when a new data model needs to be fetched (or if not using `manual`, when new data is materialized internally).
-- Renamed `filtering` -> `filtered`
-- Renamed `sorting` -> `sorted`
-- Renamed `expandedRows` -> `expanded`
-- Renamed `resizing` -> `resized`
-- Renamed `defaultResizing` -> `defaultResized`
-- Renamed `defaultFiltering` -> `defaultFiltered`
-- Renamed `defaultSorting` -> `defaultSorted`
-- Renamed `onSortingChange` -> `onSortedChange`
-- Renamed `onFilteringChange` -> `onFilteredChange`
-- Renamed `onResize` -> `onResizedChange`
-- Renamed `onExpandRow` -> `onExpandedChange`
-- Renamed `showFilters` -> `filterable`
-- Renamed `hideFilter` -> `filterable` (Column option. Note the true/false value is now flipped.)
-- `cellInfo.row` and `rowInfo.row` now reference the materialize data for the table. To reference the original row, use `cellInfo.original` and `rowInfo.original`
-- Removed `pivotRender` column option. You can now control how the value is displayed by overriding the `PivotValueComponent` or the individual column's `PivotValue` renderer. See [Pivoting Options Story](https://react-table.js.org/?selectedKind=2.%20Demos&selectedStory=Pivoting%20Options&full=0&down=1&left=1&panelRight=0&downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel) for a reference on how to customize pivot column rendering.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..fa111aa2db
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,81 @@
+---
+title: Code of Conduct
+id: code-of-conduct
+---
+
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+- Using welcoming and inclusive language
+- Being respectful of differing viewpoints and experiences
+- Gracefully accepting constructive criticism
+- Focusing on what is best for the community
+- Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+- The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+- Trolling, insulting/derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+- Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at TANNERLINSLEY@GMAIL.COM. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see
+https://www.contributor-covenant.org/faq
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000..287de60920
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,53 @@
+---
+title: Contributing
+id: contributing
+---
+
+# Contributing
+
+## Questions
+
+If you have questions about implementation details, help or support, then please use our dedicated community forum at [Github Discussions](https://github.com/tanstack/table/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum.
+
+## Reporting Issues
+
+If you have found what you think is a bug, please [file an issue](https://github.com/tanstack/table/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [Github Discussions](https://github.com/tanstack/table/discussions)
+
+## Suggesting new features
+
+If you are here to suggest a feature, first create an issue if it does not already exist. From there, we will discuss use-cases for the feature and then finally discuss how it could be implemented.
+
+## Development
+
+Before proceeding with development, ensure you match one of the following criteria:
+
+- Fixing a small bug
+- Fixing a larger issue that has been previously discussed and agreed-upon by maintainers
+- Adding a new feature that has been previously discussed and agreed-upon by maintainers
+
+## Development Workflow
+
+- Fork this repository, we prefer the `feat-*` branch name style
+- Ensure you have `pnpm` installed
+- Install projects dependencies and linkages by running `pnpm install`
+- Auto-build and auto-test files as you edit by running `pnpm dev`
+- Implement your changes and tests
+- To run examples, follow their individual directions. Usually this includes:
+ - cd into the example directory
+ - Do NOT install dependencies again or do any linking. Nx already handles this for you. Only run install from the project root.
+ - Starting the dev server with `pnpm dev` or `pnpm start` (from the example directory)
+- To test in your own projects:
+ - Build/watch for changes with `pnpm build`/`pnpm dev`
+- Document your changes in the appropriate documentation website markdown pages
+- Commit your work and open a pull request
+- Submit PR for review
+
+## Adding a new example
+
+- Clone an existing example into the appropriate `examples` directory
+- Name it the example name in kebab-case
+- Update the new example's package.json to match the new example name and any other details
+- Check dependencies for unused packages
+- Install any additional packages to the example that you may need
+- Update the docs/config.json file to include the new example in the navigation sidebar
+- Commit the example eg. `docs: Add example-name`
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
deleted file mode 100644
index bd19e34d5a..0000000000
--- a/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,14 +0,0 @@
-## What version of React-Table are you using?
-Your bug may already be fixed in the latest release. Run `yarn upgrade react-table`!
-Place your version here...
-
-## What bug are you experiencing, or what feature are you proposing?
-Please include a detailed explanation here...
-
-## Use https://codesandbox.io/s/X6npLXPRW (by clicking the "Fork" button) to reproduce the issue.
-Then paste a link to your newly forked codesandbox here...
-
-## What are the steps to reproduce the issue?
-1. list the steps
-2. to reproduce
-3. the issue
diff --git a/README.md b/README.md
index 2a422e7d1d..4490fe2758 100644
--- a/README.md
+++ b/README.md
@@ -1,946 +1,117 @@
-
-
+
+
-# React Table
-`react-table` is a **lightweight, fast and extendable datagrid** built for React
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-[](https://app.codesponsor.io/link/zpmS8V9r31sBSCeVzP7Wm6Sr/react-tools/react-table)
-
-## Features
-- Lightweight at 11kb (and just 2kb more for styles)
-- Fully customizable (JSX, templates, state, styles, callbacks)
-- Client-side & Server-side pagination
-- Multi-sort
-- Filters
-- Pivoting & Aggregation
-- Minimal design & easily themeable
-- Fully controllable via optional props and callbacks
-- "Why I wrote React Table and the problems it has solved for Nozzle.io" by Tanner Linsley
-
-## [Demos and examples](http://react-table.js.org/#/story/simple-table)
-
-## Versions
-- This documentation is for version 6 of react-table.
-- [View the Changelog](https://github.com/react-tools/react-table/blob/master/CHANGELOG.md)
-- Previous versions:
- - [5.x.x Readme](https://github.com/react-tools/react-table/blob/ad7d31cd3978eb45da7c6194dbab93c1e9a8594d/README.md)
-
-## Table of Contents
-- [Installation](#installation)
-- [Example](#example)
-- [Data](#data)
-- [Props](#props)
-- [Columns](#columns)
-- [Column Header Groups](#column-header-groups)
-- [Custom Cell and Header and Footer Rendering](#custom-cell-header-and-footer-rendering)
-- [Styles](#styles)
-- [Custom Props](#custom-props)
-- [Pivoting and Aggregation](#pivoting-and-aggregation)
-- [Sub Tables and Sub Components](#sub-tables-and-sub-components)
-- [Server-side Data](#server-side-data)
-- [Fully Controlled Component](#fully-controlled-component)
-- [Functional Rendering](#functional-rendering)
-- [Multi-Sort](#multi-sort)
-- [Filtering](#filtering)
-- [Component Overrides](#component-overrides)
-- [Contributing](#contributing)
-- [Scripts](#scripts)
-- [Used By](#used-by)
-
-
-## Installation
-1. Install React Table as a dependency
-```bash
-# Yarn
-$ yarn add react-table
-
-# NPM
-$ npm install react-table
-```
-2. Import the `react-table` module
-```javascript
-// ES6
-import ReactTable from 'react-table'
-// ES5
-var ReactTable = require('react-table').default
-```
-3. Import styles by including `react-table.css`
-```javascript
-// JS (Webpack)
-import 'react-table/react-table.css'
-// Old-school
-
-```
-##### CDN
-```html
-
-
-
-
-
-
-
-```
-
-
-## Example
-```javascript
-import ReactTable from 'react-table'
-
-render() {
- const data = [{
- name: 'Tanner Linsley',
- age: 26,
- friend: {
- name: 'Jason Maurer',
- age: 23,
- }
- },{
- ...
- }]
-
- const columns = [{
- Header: 'Name',
- accessor: 'name' // String-based value accessors!
- }, {
- Header: 'Age',
- accessor: 'age',
- Cell: props => {props.value} // Custom cell components!
- }, {
- id: 'friendName', // Required because our accessor is not a string
- Header: 'Friend Name',
- accessor: d => d.friend.name // Custom value accessors!
- }, {
- Header: props => Friend Age, // Custom header components!
- accessor: 'friend.age'
- }]
-
-
-}
-```
-
-## Data
-Simply pass the `data` prop anything that resembles an array or object. Client-side sorting and pagination are built in, and your table will update gracefully as you change any props. [Server-side data](#server-side-data) is also supported!
-
-
-## Props
-These are all of the available props (and their default values) for the main `` component.
-```javascript
-{
- // General
- data: [],
- loading: false,
- showPagination: true,
- showPaginationTop: false,
- showPaginationBottom: true
- showPageSizeOptions: true,
- pageSizeOptions: [5, 10, 20, 25, 50, 100],
- defaultPageSize: 20,
- minRows: undefined,
- showPageJump: true,
- collapseOnSortingChange: true,
- collapseOnPageChange: true,
- collapseOnDataChange: true,
- freezeWhenExpanded: false,
- sortable: true,
- multiSort: true,
- resizable: true,
- filterable: false,
- defaultSortDesc: false,
- defaultSorted: [],
- defaultFiltered: [],
- defaultResized: [],
- defaultExpanded: {},
- defaultFilterMethod: (filter, row, column) => {
- const id = filter.pivotId || filter.id
- return row[id] !== undefined ? String(row[id]).startsWith(filter.value) : true
- },
- defaultSortMethod: (a, b, desc) => {
- // force null and undefined to the bottom
- a = (a === null || a === undefined) ? -Infinity : a
- b = (b === null || b === undefined) ? -Infinity : b
- // force any string values to lowercase
- a = a === 'string' ? a.toLowerCase() : a
- b = b === 'string' ? b.toLowerCase() : b
- // Return either 1 or -1 to indicate a sort priority
- if (a > b) {
- return 1
- }
- if (a < b) {
- return -1
- }
- // returning 0, undefined or any falsey value will use subsequent sorts or the index as a tiebreaker
- return 0
- },
- PadRowComponent: () => , // the content rendered inside of a padding row
-
- // Controlled State Overrides (see Fully Controlled Component section)
- page: undefined,
- pageSize: undefined,
- sorted: [],
- filtered: [],
- resized: [],
- expanded: {},
-
- // Controlled State Callbacks
- onPageChange: undefined,
- onPageSizeChange: undefined,
- onSortedChange: undefined,
- onFilteredChange: undefined,
- onResizedChange: undefined,
- onExpandedChange: undefined,
-
- // Pivoting
- pivotBy: undefined,
-
- // Key Constants
- pivotValKey: '_pivotVal',
- pivotIDKey: '_pivotID',
- subRowsKey: '_subRows',
- aggregatedKey: '_aggregated',
- nestingLevelKey: '_nestingLevel',
- originalKey: '_original',
- indexKey: '_index',
- groupedByPivotKey: '_groupedByPivot',
-
- // Server-side callbacks
- onFetchData: () => null,
-
- // Classes
- className: '',
- style: {},
-
- // Component decorators
- getProps: () => ({}),
- getTableProps: () => ({}),
- getTheadGroupProps: () => ({}),
- getTheadGroupTrProps: () => ({}),
- getTheadGroupThProps: () => ({}),
- getTheadProps: () => ({}),
- getTheadTrProps: () => ({}),
- getTheadThProps: () => ({}),
- getTheadFilterProps: () => ({}),
- getTheadFilterTrProps: () => ({}),
- getTheadFilterThProps: () => ({}),
- getTbodyProps: () => ({}),
- getTrGroupProps: () => ({}),
- getTrProps: () => ({}),
- getThProps: () => ({}),
- getTdProps: () => ({}),
- getTfootProps: () => ({}),
- getTfootTrProps: () => ({}),
- getTfootThProps: () => ({}),
- getPaginationProps: () => ({}),
- getLoadingProps: () => ({}),
- getNoDataProps: () => ({}),
- getResizerProps: () => ({}),
-
- // Global Column Defaults
- column: {
- // Renderers
- Cell: undefined,
- Header: undefined,
- Footer: undefined,
- Aggregated: undefined,
- Pivot: undefined,
- PivotValue: undefined,
- Expander: undefined,
- Filter: undefined,
- // Standard options
- sortable: undefined, // use table default
- resizable: undefined, // use table default
- filterable: undefined, // use table default
- show: true,
- minWidth: 100,
- // Cells only
- className: '',
- style: {},
- getProps: () => ({}),
- // Headers only
- headerClassName: '',
- headerStyle: {},
- getHeaderProps: () => ({})
- // Footers only
- footerClassName: '',
- footerStyle: {},
- getFooterProps: () => ({}),
- filterAll: false,
- filterMethod: undefined,
- sortMethod: undefined,
- defaultSortDesc: undefined,
- },
-
- // Global Expander Column Defaults
- expanderDefaults: {
- sortable: false,
- resizable: false,
- filterable: false,
- width: 35
- },
-
- // Global Pivot Column Defaults
- pivotDefaults: {},
-
- // Text
- previousText: 'Previous',
- nextText: 'Next',
- loadingText: 'Loading...',
- noDataText: 'No rows found',
- pageText: 'Page',
- ofText: 'of',
- rowsText: 'rows',
-}
-```
-
-You can easily override the core defaults like so:
-
-```javascript
-import { ReactTableDefaults } from 'react-table'
-
-Object.assign(ReactTableDefaults, {
- defaultPageSize: 10,
- minRows: 3,
- // etc...
-})
-```
-
-Or just define them as props
-
-```javascript
-
-```
-
-## Columns
-`` requires a `columns` prop, which is an array of objects containing the following properties
-
-```javascript
-[{
- // Renderers - For more information, see "Renderers" section below
- Cell: JSX | String | Function // Used to render a standard cell, defaults to the accessed value
- Header: JSX | String | Function // Used to render the header of a column or column group
- Footer: JSX | String | Function // Used to render the footer of a column
- Filter: JSX | cellInfo => ( // Used to render the filter UI of a filter-enabled column
-
- // The value passed to onFiltersChange will be the value passed to filter.value of the filterMethod
- )
- Aggregated: JSX | String | Function // Used to render aggregated cells. Defaults to a comma separated list of values.
- Pivot: JSX | String | Function | cellInfo => ( // Used to render a pivoted cell
-
- // By default, will utilize the the PivotValue and Expander components at run time
-
- ),
- PivotValue: JSX | String | Function // Used to render the value inside of a Pivot cell
- Expander: JSX | String | Function // Used to render the expander in both Pivot and Expander cells
-
- // General
- accessor: 'propertyName', // or Accessor eg. (row) => row.propertyName (see "Accessors" section for more details)
- id: 'myProperty', // Conditional - A unique ID is required if the accessor is not a string or if you would like to override the column name used in server-side calls
- sortable: boolean, // Overrides the table option
- resizable: boolean, // Overrides the table option
- filterable: boolean, // Overrides the table option
- show: true, // can be used to hide a column
- width: undefined, // A hardcoded width for the column. This overrides both min and max width options
- minWidth: 100, // A minimum width for this column. If there is extra room, column will flex to fill available space (up to the max-width, if set)
- maxWidth: undefined, // A maximum width for this column.
-
- // Special
- pivot: false,
- // Turns this column into a special column for specifying pivot position in your column definitions.
- // The `pivotDefaults` options will be applied on top of this column's options.
- // It will also let you specify rendering of the header (and header group if this special column is placed in the `columns` option of another column)
- expander: false,
- // Turns this column into a special column for specifying expander position and options in your column definitions.
- // The `expanderDefaults` options will be applied on top of this column's options.
- // It will also let you specify rendering of the header (and header group if this special column is placed in the `columns` option of another column) and
- // the rendering of the expander itself via the `Expander` property
-
- // Cell Options
- className: '', // Set the classname of the `td` element of the column
- style: {}, // Set the style of the `td` element of the column
- // Header & HeaderGroup Options
- headerClassName: '', // Set the classname of the `th` element of the column
- headerStyle: {}, // Set the style of the `th` element of the column
- getHeaderProps: (state, rowInfo, column, instance) => ({}), // a function that returns props to decorate the `th` element of the column
-
- // Header Groups only
- columns: [...], // See Header Groups section below
-
- // Footer
- footerClassName: '', // Set the classname of the `td` element of the column's footer
- footerStyle: {}, // Set the style of the `td` element of the column's footer
- getFooterProps: (state, rowInfo, column, instance) => ({}), // A function that returns props to decorate the `td` element of the column's footer
-
- // Filtering
- filterMethod: (filter, row || rows, column) => {return true}, // A function returning a boolean that specifies the filtering logic for the column
- // 'filter' == an object specifying which filter is being applied. Format: {id: [the filter column's id], value: [the value the user typed in the filter field], pivotId: [if filtering on a pivot column, the pivotId will be set to the pivot column's id and the `id` field will be set to the top level pivoting column]}
- // 'row' || 'rows' == the row (or rows, if filterAll is set to true) of data supplied to the table
- // 'column' == the column that the filter is on
- filterAll: false
-}]
-```
-
-## Renderers
-React Table supports very flexible renderers for just about everything:
-- `Cell` - Renders a standard cell
-- `Header` - Renders a column header or column group header
-- `Footer` - Renders a column footer
-- `Filter` - Renders a column's filter UI
-- `Aggregated` - Renders an aggregated cell
-- `Pivot` - Renders a pivoted cell (by default, will utilize `Expander` and `PivotValue` renderers)
-- `PivotValue` - Renders the value inside a `Pivot` renderer
-- `Expander` - Renders the Expander used in both the default `Pivot` renderer and any expander-designated column
-
-Any of these renderers can be one of the following:
-- A React Class
-- JSX or any rendered react component
-- Stateless functional component
-- Function that returns any primitive
-
-All of these formats receive the following props:
-```javascript
-{
- // Row-level props
- row: Object, // the materialized row of data
- original: , // the original row of data
- index: '', // the index of the row in the original arra
- viewIndex: '', // the index of the row relative to the current view
- level: '', // the nesting level of this row
- nestingPath: '', // the nesting path of this row
- aggregated: '', // true if this row's values were aggregated
- groupedByPivot: '', // true if this row was produced by a pivot
- subRows: '', // any sub rows defined by the `subRowKey` prop
-
- // Cells-level props
- isExpanded: '', // true if this row is expanded
- value: '', // the materialized value of this cell
- resized: '', // the resize information for this cell's column
- show: '', // true if the column is visible
- width: '', // the resolved width of this cell
- maxWidth: '', // the resolved maxWidth of this cell
- tdProps: '', // the resolved tdProps from `getTdProps` for this cell
- columnProps: '', // the resolved column props from 'getProps' for this cell's column
- classes: '', // the resolved array of classes for this cell
- styles: '' // the resolved styles for this cell
-}
-```
-
-## Accessors
-Accessors are functions that return the value to populate the row's value for the column.
-This lets the render function not have to worry about accessing the correct data, the value is automatically populated in it's props.
-
-If a `string` or `array` is passed the default accessor is used.
-The default accessor will parse the input into an array and recursively flatten it.
-Any values that contain a dot (`.`) will be split.
-Any values that contain bracket (`[]`) will be split.
-This array is then used as the path to the value to return.
-
-("$" is the placeholder value that would be returned by the default accessor)
-
-| value | path | data |
-|--------------|-----------------|------------------------|
-| "a" | ["a"] | {"a": $} |
-| "a.b" | ["a", "b"] | {"a": {"b": $}} |
-| "a[0]" | ["a", "0"] | {"a": [$]} |
-| ["a.b", "c"] | ["a", "b", "c"] | {"a": {"b": {"c": $}}} |
-
-*NOTE*
-If your data has a field/key with a dot (`.`) you will need to supply a custom accessor.
-
-
-## Column Header Groups
-To group columns with another header column, just nest your columns in a header column. Header columns utilize the same header properties as regular columns.
-```javascript
-const columns = [{
- Header: 'Favorites',
- headerClassName: 'my-favorites-column-header-group'
- columns: [{
- Header: 'Color',
- accessor: 'favorites.color'
- }, {
- Header: 'Food',
- accessor: 'favorites.food'
- }, {
- Header: 'Actor',
- accessor: 'favorites.actor'
- }]
-}]
-```
-
-## Custom Cell, Header and Footer Rendering
-You can use any react component or JSX to display content in column headers, cells and footers. Any component you use will be passed the following props (if available):
-- `row` - Original row from your data
-- `row` - The post-accessed values from the original row
-- `index` - The index of the row
-- `viewIndex` - the index of the row relative to the current page
-- `level` - The nesting depth (zero-indexed)
-- `nestingPath` - The nesting path of the row
-- `aggregated` - A boolean stating if the row is an aggregation row
-- `subRows` - An array of any expandable sub-rows contained in this row
-
-```javascript
-// This column uses a stateless component to produce a different colored bar depending on the value
-// You can also use stateful components or any other function that returns JSX
-const columns = [{
- Header: () => Progress,
- accessor: 'progress',
- Cell: row => (
-
- )
-}]
-```
-
-## Styles
-- React-table ships with a minimal and clean stylesheet to get you on your feet quickly.
-- The stylesheet is located at `react-table/react-table.css`.
-- There are countless ways to import a stylesheet. If you have questions on how to do so, consult the documentation of your build system.
-
-#### Classes
-- Adding a `-striped` className to ReactTable will slightly color odd numbered rows for legibility
-- Adding a `-highlight` className to ReactTable will highlight any row as you hover over it
-
-#### CSS
-We think the default styles looks great! But, if you prefer a more custom look, all of the included styles are easily overridable. Every single component contains a unique class that makes it super easy to customize. Just go for it!
-
-#### JS Styles
-Every single react-table element and `get[ComponentName]Props` callback supports `classname` and `style` props.
-
-## Custom Props
-
-#### Built-in Components
-Every single built-in component's props can be dynamically extended using any one of these prop-callbacks:
-```javascript
-
-```
-
-If used, **a callback prop must return an valid object**, even if it's an empty one.
-
-These callbacks are executed with each render of the element with four parameters:
- 1. Table State
- 2. RowInfo (undefined if not applicable)
- 3. Column (undefined if not applicable)
- 4. React Table Instance
-
-This makes it extremely easy to add, say... a row click callback!
-```javascript
-// When any Td element is clicked, we'll log out some information
- {
- return {
- onClick: (e, handleOriginal) => {
- console.log('A Td Element was clicked!')
- console.log('it produced this event:', e)
- console.log('It was in this column:', column)
- console.log('It was in this row:', rowInfo)
- console.log('It was in this table instance:', instance)
-
- // IMPORTANT! React-Table uses onClick internally to trigger
- // events like expanding SubComponents and pivots.
- // By default a custom 'onClick' handler will override this functionality.
- // If you want to fire the original onClick handler, call the
- // 'handleOriginal' function.
- if (handleOriginal) {
- handleOriginal()
- }
- }
- }
- }}
-/>
-```
-
-You can use these callbacks for dynamic styling as well!
-```javascript
-// Any Tr element will be green if its (row.age > 20)
- {
- return {
- style: {
- background: rowInfo.row.age > 20 ? 'green' : 'red'
- }
- }
- }}
-/>
-```
-
-#### Column Components
-Just as core components can have dynamic props, columns and column headers can too!
-
-You can utilize either of these prop callbacks on columns:
-```javascript
-const columns = [{
- getHeaderProps: () => (...),
- getProps: () => (...)
-}]
-```
-
-In a similar fashion these can be used to dynamically style just about anything!
-```javascript
-// This columns cells will be red if (row.name === Santa Clause)
-const columns = [{
- getProps: (state, rowInfo, column) => {
- return {
- style: {
- background: rowInfo.row.name === 'Santa Clause' ? 'red' : null
- }
- }
- }
-}]
-```
-
-## Pivoting and Aggregation
-Pivoting the table will group records together based on their accessed values and allow the rows in that group to be expanded underneath it.
-To pivot, pass an array of `columnID`'s to `pivotBy`. Remember, a column's `id` is either the one that you assign it (when using a custom accessors) or its `accessor` string.
-```javascript
-
-```
-
-Naturally when grouping rows together, you may want to aggregate the rows inside it into the grouped column. No aggregation is done by default, however, it is very simple to aggregate any pivoted columns:
-```javascript
-// In this example, we use lodash to sum and average the values, but you can use whatever you want to aggregate.
-const columns = [{
- Header: 'Age',
- accessor: 'age',
- aggregate: (values, rows) => _.round(_.mean(values)),
- Aggregated: row => {
- // You can even render the cell differently if it's an aggregated cell
- return row.value (avg)
- }
-}, {
- Header: 'Visits',
- accessor: 'visits',
- aggregate: (values, rows) => _.sum(values)
-}]
-```
-
-Pivoted columns can be sorted just like regular columns including holding down the `` button to multi-sort.
-
-## Sub Tables and Sub Components
-By adding a `SubComponent` props, you can easily add an expansion level to all root-level rows:
-```javascript
- {
- return (
-
- You can put any component you want here, even another React Table! You even have access to the row-level data if you need! Spark-charts, drill-throughs, infographics... the possibilities are endless!
-
- )
- }}
-/>
-```
-
-
-## Server-side Data
-If you want to handle pagination, sorting, and filtering on the server, `react-table` makes it easy on you.
-
-1. Feed React Table `data` from somewhere dynamic. eg. `state`, a redux store, etc...
-1. Add `manual` as a prop. This informs React Table that you'll be handling sorting and pagination server-side
-1. Subscribe to the `onFetchData` prop. This function is called at `compomentDidMount` and any time sorting, pagination or filterting is changed in the table
-1. In the `onFetchData` callback, request your data using the provided information in the params of the function (current state and instance)
-1. Update your data with the rows to be displayed
-1. Optionally set how many pages there are total
-
-```javascript
- {
- // show the loading overlay
- this.setState({loading: true})
- // fetch your data
- Axios.post('mysite.com/data', {
- page: state.page,
- pageSize: state.pageSize,
- sorted: state.sorted,
- filtered: state.filtered
- })
- .then((res) => {
- // Update react-table
- this.setState({
- data: res.data.rows,
- pages: res.data.pages,
- loading: false
- })
- })
- }}
-/>
-```
-
-For a detailed example, take a peek at our async table mockup
-
-## Fully Controlled Component
-React Table by default works fantastically out of the box, but you can achieve even more control and customization if you choose to maintain the state yourself. It is very easy to do, even if you only want to manage *parts* of the state.
-
-Here are the props and their corresponding callbacks that control the state of the a table:
-```javascript
- {...}} // Called when the page index is changed by the user
- onPageSizeChange={(pageSize, pageIndex) => {...}} // Called when the pageSize is changed by the user. The resolve page is also sent to maintain approximate position in the data
- onSortedChange={(newSorted, column, shiftKey) => {...}} // Called when a sortable column header is clicked with the column itself and if the shiftkey was held. If the column is a pivoted column, `column` will be an array of columns
- onExpandedChange={(newExpanded, index, event) => {...}} // Called when an expander is clicked. Use this to manage `expanded`
- onFilteredChange={(column, value) => {...}} // Called when a user enters a value into a filter input field or the value passed to the onFiltersChange handler by the Filter option.
- onResizedChange={(newResized, event) => {...}} // Called when a user clicks on a resizing component (the right edge of a column header)
-/>
-```
+
-## Functional Rendering
-Possibly one of the coolest features of React-Table is its ability to expose internal components and state for custom render logic. The easiest way to do this is to pass a function as the child of ``.
+### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/)
-The function you pass will be called with the following items:
-- Fully-resolved state of the table
-- A function that returns the standard table component
-- The instance of the component
+
-You can then return any JSX or react you want! This turns out to be perfect for:
-- Accessing the internal state of the table without a `ref`
-- Decorating the table or extending it with your own UI
-- Building your own custom display logic
+# TanStack Table
-Accessing internal state and wrapping with more UI:
-```javascript
- [!NOTE]
+> You may know TanStack Table by the adapter names:
>
- {(state, makeTable, instance) => {
- return (
-
- )
- }}
-
-```
-
-The possibilities are endless!
-
-## Sorting
-Sorting comes built in with React-Table.
-- Click a column header to sort by its accessor.
-- Click it again to reverse the sort.
-- Set `defaultSortDesc` property to `true` to make the first sort direction default to descending.
-- Override a specific column's default sort direction by using the same `defaultSortDesc` property on a column, set to `true`
-
-## Multi-Sort
-When clicking on a column header, hold shift to multi-sort! You can toggle `ascending` `descending` and `none` for multi-sort columns. Clicking on a header without holding shift will clear the multi-sort and replace it with the single sort of that column. It's quite handy!
-
-You can set the `multiSort` prop to `false` to disable this feature (which may be useful for server-side sorting when you are not
-going to sort multiple columns).
-
-## Custom Sorting Algorithm
-To override the default sorting algorithm for the whole table use the `defaultSortMethod` prop.
-
-To override the sorting algorithm for a single column, use the `sortMethod` column property.
-
-Supply a function that implements the native javascript [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) interface. This is React Table's default sorting algorithm:
-- `a` the first value to compare
-- `b` the second value to compare
-- `desc` true if sort is descending, false if ascending
-```javascript
-defaultSortMethod = (a, b, desc) => {
- // force null and undefined to the bottom
- a = (a === null || a === undefined) ? -Infinity : a
- b = (b === null || b === undefined) ? -Infinity : b
- // force any string values to lowercase
- a = typeof a === 'string' ? a.toLowerCase() : a
- b = typeof b === 'string' ? b.toLowerCase() : b
- // Return either 1 or -1 to indicate a sort priority
- if (a > b) {
- return 1
- }
- if (a < b) {
- return -1
- }
- // returning 0 or undefined will use any subsequent column sorting methods or the row index as a tiebreaker
- return 0
-}
-```
-
-## Filtering
-Filtering can be enabled by setting the `filterable` option on the table.
-
-If you don't want particular column to be filtered you can set the `filterable={false}` option on the column.
-
-By default the table tries to filter by checking if the row's value starts with the filter text. The default method for filtering the table can be set with the table's `defaultFilterMethod` option.
-
-If you want to override a particular column's filtering method, you can set the `filterMethod` option on a column.
-
-By default, `filterMethod` is passed a single row of data at a time, and you are responsible for returning `true` or `false`, indicating whether it should be shown.
-
-Alternatively, you can set `filterAll` to `true`, and `filterMethod` will be passed the entire array of rows to be filtered, and you will then be responsible for returning the new filtered array. This is extremely handy when you need to utilize a utility like fuzzy matching that requires the entire array of items.
-
-To completely override the filter that is shown, you can set the `Filter` column option. Using this option you can specify the JSX that is shown. The option is passed an `onChange` method which must be called with the the value that you want to pass to the `filterMethod` option whenever the filter has changed.
-
-See Custom Filtering demo for examples.
-
-## Component Overrides
-Though we confidently stand by the markup and architecture behind it, `react-table` does offer the ability to change the core componentry it uses to render everything. You can extend or override these internal components by passing a react component to it's corresponding prop on either the global props or on a one-off basis like so:
-```javascript
-// Change the global default
-import { ReactTableDefaults } from 'react-table'
-Object.assign(ReactTableDefaults, {
- TableComponent: component,
- TheadComponent: component,
- TbodyComponent: component,
- TrGroupComponent: component,
- TrComponent: component,
- ThComponent: component,
- TdComponent: component,
- TfootComponent: component,
- ExpanderComponent: component,
- AggregatedComponent: component,
- PivotValueComponent: component,
- PivotComponent: component,
- FilterComponent: component,
- PaginationComponent: component,
- PreviousComponent: undefined,
- NextComponent: undefined,
- LoadingComponent: component,
- NoDataComponent: component,
- ResizerComponent: component
-})
-
-// Or change per instance
-
-```
-
-If you choose to change the core components React-Table uses to render, you must make sure your replacement components consume and utilize all of the supplied and inherited props that are needed for that component to function properly. We would suggest investigating the source for the component you wish to replace.
-
-
-## Contributing
-To suggest a feature, create an issue if it does not already exist.
-If you would like to help develop a suggested feature follow these steps:
-
-- Fork this repo
-- Install dependencies with `$ yarn`
-- Auto-build files as you edit with `$ yarn run watch`
-- Implement your changes to files in the `src/` directory
-- Run the React Story locally with `$ yarn run docs`
-- View changes as you edit `docs/src`
-- Submit PR for review
+> - [Angular Table](https://tanstack.com/table/alpha/docs/framework/angular/angular-table)
+> - [Lit Table](https://tanstack.com/table/alpha/docs/framework/lit/lit-table)
+> - [React Table](https://tanstack.com/table/alpha/docs/framework/react/react-table)
+> - [Solid Table](https://tanstack.com/table/alpha/docs/framework/solid/solid-table)
+> - [Svelte Table](https://tanstack.com/table/alpha/docs/framework/svelte/svelte-table)
+> - [Vue Table](https://tanstack.com/table/alpha/docs/framework/vue/vue-table)
+
+A headless table library for building powerful datagrids with full control over markup, styles, and behavior.
+
+- Framework‑agnostic core with bindings for React, Vue & Solid
+- 100% customizable — bring your own UI, components, and styles
+- Sorting, filtering, grouping, aggregation & row selection
+- Lightweight, virtualizable & server‑side friendly
+
+### Read the Docs →
+
+## Get Involved
+
+- We welcome issues and pull requests!
+- Participate in [GitHub discussions](https://github.com/TanStack/table/discussions)
+- Chat with the community on [Discord](https://discord.com/invite/WrRKjPJ)
+- See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup instructions
+
+## Partners
+
+
+We're looking for TanStack Table Partners to join our mission! Partner with us to push the boundaries of TanStack Table and build amazing things together.
+
-#### Scripts
+## Explore the TanStack Ecosystem
-- `$ yarn run watch` Watches files and builds via babel
-- `$ yarn run docs` Runs the storybook server
-- `$ yarn run test` Runs the test suite
+- TanStack Config – Tooling for JS/TS packages
+- TanStack DB – Reactive sync client store
+- TanStack DevTools – Unified devtools panel
+- TanStack Form – Type‑safe form state
+- TanStack Pacer – Debouncing, throttling, batching
+- TanStack Query – Async state & caching
+- TanStack Ranger – Range & slider primitives
+- TanStack Router – Type‑safe routing, caching & URL state
+- TanStack Start – Full‑stack SSR & streaming
+- TanStack Store – Reactive data store
+- TanStack Virtual – Virtualized rendering
-## Used By
+… and more at TanStack.com »
-
-
-
+
diff --git a/docs/.eslintrc.js b/docs/.eslintrc.js
deleted file mode 100644
index 9e5806e444..0000000000
--- a/docs/.eslintrc.js
+++ /dev/null
@@ -1,77 +0,0 @@
-module.exports = {
- parserOptions: {
- ecmaVersion: 8,
- ecmaFeatures: {
- experimentalObjectRestSpread: true,
- jsx: true,
- node: false,
- classes: true
- },
- sourceType: 'module'
- },
-
- parser: 'babel-eslint',
-
- extends: ['standard'],
-
- plugins: ['react'],
-
- rules: {
- // Nozzle
- 'jsx-quotes': [2, 'prefer-single'],
- 'comma-dangle': [2, 'always-multiline'],
-
- // // React
- 'react/jsx-boolean-value': 2,
- 'react/jsx-curly-spacing': [2, 'never'],
- 'react/jsx-equals-spacing': [2, 'never'],
- // 'react/jsx-indent': 2,
- 'react/jsx-indent-props': [2, 2],
- 'react/jsx-no-duplicate-props': 2,
- 'react/jsx-no-undef': 2,
- 'react/jsx-tag-spacing': [
- 2,
- {
- closingSlash: 'never',
- beforeSelfClosing: 'always',
- afterOpening: 'never'
- }
- ],
- 'react/jsx-uses-react': 2,
- 'react/jsx-uses-vars': 2,
- 'react/self-closing-comp': 2,
- 'react/jsx-no-bind': [
- 2,
- {
- allowArrowFunctions: true,
- allowBind: false,
- ignoreRefs: true
- }
- ],
- 'react/no-did-update-set-state': 2,
- 'react/no-unknown-property': 2,
- 'react/react-in-jsx-scope': 2,
- 'react/jsx-closing-bracket-location': [0, 'tag-aligned'],
- 'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
- 'react/jsx-wrap-multilines': 2,
- 'react/self-closing-comp': 2,
- 'react/jsx-key': 2,
- 'react/jsx-no-comment-textnodes': 2,
- 'react/jsx-no-duplicate-props': 2,
- 'react/jsx-no-target-blank': 2,
- 'react/jsx-no-undef': 2,
- 'react/jsx-uses-react': 2,
- 'react/jsx-uses-vars': 2,
- 'react/no-danger-with-children': 2,
- 'react/no-deprecated': 2,
- 'react/no-direct-mutation-state': 2,
- 'react/no-find-dom-node': 2,
- 'react/no-is-mounted': 2,
- 'react/no-render-return-value': 2,
- 'react/no-string-refs': 2,
- 'react/no-unknown-property': 2,
- 'react/react-in-jsx-scope': 2,
- 'react/require-render-return': 2
- // 'react/jsx-max-props-per-line': [2, { maximum: 1 }]
- }
-}
diff --git a/docs/CNAME b/docs/CNAME
deleted file mode 100644
index b05ccdf5fd..0000000000
--- a/docs/CNAME
+++ /dev/null
@@ -1 +0,0 @@
-react-table.js.org
\ No newline at end of file
diff --git a/docs/README.md b/docs/README.md
deleted file mode 100644
index a5203365f5..0000000000
--- a/docs/README.md
+++ /dev/null
@@ -1,1623 +0,0 @@
-This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
-
-Below you will find some information on how to perform common tasks.
-You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
-
-## Table of Contents
-
-- [Updating to New Releases](#updating-to-new-releases)
-- [Sending Feedback](#sending-feedback)
-- [Folder Structure](#folder-structure)
-- [Available Scripts](#available-scripts)
- - [npm start](#npm-start)
- - [npm test](#npm-test)
- - [npm run build](#npm-run-build)
- - [npm run eject](#npm-run-eject)
-- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills)
-- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor)
-- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
-- [Debugging in the Editor](#debugging-in-the-editor)
-- [Changing the Page ``](#changing-the-page-title)
-- [Installing a Dependency](#installing-a-dependency)
-- [Importing a Component](#importing-a-component)
-- [Adding a Stylesheet](#adding-a-stylesheet)
-- [Post-Processing CSS](#post-processing-css)
-- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc)
-- [Adding Images and Fonts](#adding-images-and-fonts)
-- [Using the `public` Folder](#using-the-public-folder)
- - [Changing the HTML](#changing-the-html)
- - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system)
- - [When to Use the `public` Folder](#when-to-use-the-public-folder)
-- [Using Global Variables](#using-global-variables)
-- [Adding Bootstrap](#adding-bootstrap)
- - [Using a Custom Theme](#using-a-custom-theme)
-- [Adding Flow](#adding-flow)
-- [Adding Custom Environment Variables](#adding-custom-environment-variables)
- - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html)
- - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell)
- - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env)
-- [Can I Use Decorators?](#can-i-use-decorators)
-- [Integrating with an API Backend](#integrating-with-an-api-backend)
- - [Node](#node)
- - [Ruby on Rails](#ruby-on-rails)
-- [Proxying API Requests in Development](#proxying-api-requests-in-development)
-- [Using HTTPS in Development](#using-https-in-development)
-- [Generating Dynamic `` Tags on the Server](#generating-dynamic-meta-tags-on-the-server)
-- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files)
-- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page)
-- [Running Tests](#running-tests)
- - [Filename Conventions](#filename-conventions)
- - [Command Line Interface](#command-line-interface)
- - [Version Control Integration](#version-control-integration)
- - [Writing Tests](#writing-tests)
- - [Testing Components](#testing-components)
- - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries)
- - [Initializing Test Environment](#initializing-test-environment)
- - [Focusing and Excluding Tests](#focusing-and-excluding-tests)
- - [Coverage Reporting](#coverage-reporting)
- - [Continuous Integration](#continuous-integration)
- - [Disabling jsdom](#disabling-jsdom)
- - [Snapshot Testing](#snapshot-testing)
- - [Editor Integration](#editor-integration)
-- [Developing Components in Isolation](#developing-components-in-isolation)
-- [Making a Progressive Web App](#making-a-progressive-web-app)
-- [Deployment](#deployment)
- - [Static Server](#static-server)
- - [Other Solutions](#other-solutions)
- - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing)
- - [Building for Relative Paths](#building-for-relative-paths)
- - [Azure](#azure)
- - [Firebase](#firebase)
- - [GitHub Pages](#github-pages)
- - [Heroku](#heroku)
- - [Modulus](#modulus)
- - [Netlify](#netlify)
- - [Now](#now)
- - [S3 and CloudFront](#s3-and-cloudfront)
- - [Surge](#surge)
-- [Advanced Configuration](#advanced-configuration)
-- [Troubleshooting](#troubleshooting)
- - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes)
- - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra)
- - [`npm run build` silently fails](#npm-run-build-silently-fails)
- - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku)
-- [Something Missing?](#something-missing)
-
-## Updating to New Releases
-
-Create React App is divided into two packages:
-
-* `create-react-app` is a global command-line utility that you use to create new projects.
-* `react-scripts` is a development dependency in the generated projects (including this one).
-
-You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`.
-
-When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically.
-
-To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions.
-
-In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes.
-
-We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly.
-
-## Sending Feedback
-
-We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues).
-
-## Folder Structure
-
-After creation, your project should look like this:
-
-```
-my-app/
- README.md
- node_modules/
- package.json
- public/
- index.html
- favicon.ico
- src/
- App.css
- App.js
- App.test.js
- index.css
- index.js
- logo.svg
-```
-
-For the project to build, **these files must exist with exact filenames**:
-
-* `public/index.html` is the page template;
-* `src/index.js` is the JavaScript entry point.
-
-You can delete or rename the other files.
-
-You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.
-You need to **put any JS and CSS files inside `src`**, or Webpack won’t see them.
-
-Only files inside `public` can be used from `public/index.html`.
-Read instructions below for using assets from JavaScript and HTML.
-
-You can, however, create more top-level directories.
-They will not be included in the production build so you can use them for things like documentation.
-
-## Available Scripts
-
-In the project directory, you can run:
-
-### `npm start`
-
-Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
-
-The page will reload if you make edits.
-You will also see any lint errors in the console.
-
-### `npm test`
-
-Launches the test runner in the interactive watch mode.
-See the section about [running tests](#running-tests) for more information.
-
-### `npm run build`
-
-Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance.
-
-The build is minified and the filenames include the hashes.
-Your app is ready to be deployed!
-
-See the section about [deployment](#deployment) for more information.
-
-### `npm run eject`
-
-**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
-
-If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
-
-Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
-
-You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
-
-## Supported Language Features and Polyfills
-
-This project supports a superset of the latest JavaScript standard.
-In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports:
-
-* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016).
-* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017).
-* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal).
-* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (stage 2 proposal).
-* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax.
-
-Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-).
-
-While we recommend to use experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future.
-
-Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**:
-
-* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign).
-* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise).
-* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch).
-
-If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them.
-
-## Syntax Highlighting in the Editor
-
-To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered.
-
-## Displaying Lint Output in the Editor
-
->Note: this feature is available with `react-scripts@0.2.0` and higher.
-
-Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint.
-
-They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do.
-
-You would need to install an ESLint plugin for your editor first.
-
->**A note for Atom `linter-eslint` users**
-
->If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked:
-
->
-
-
->**For Visual Studio Code users**
-
->VS Code ESLint plugin automatically detects Create React App's configuration file. So you do not need to create `eslintrc.json` at the root directory, except when you want to add your own rules. In that case, you should include CRA's config by adding this line:
-
->```js
-{
- // ...
- "extends": "react-app"
-}
-```
-
-Then add this block to the `package.json` file of your project:
-
-```js
-{
- // ...
- "eslintConfig": {
- "extends": "react-app"
- }
-}
-```
-
-Finally, you will need to install some packages *globally*:
-
-```sh
-npm install -g eslint-config-react-app@0.3.0 eslint@3.8.1 babel-eslint@7.0.0 eslint-plugin-react@6.4.1 eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@4.0.0 eslint-plugin-flowtype@2.21.0
-```
-
-We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
-
-## Debugging in the Editor
-
-**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) editor.**
-
-Visual Studio Code supports live-editing and debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools.
-
-You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed.
-
-Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory.
-
-```json
-{
- "version": "0.2.0",
- "configurations": [{
- "name": "Chrome",
- "type": "chrome",
- "request": "launch",
- "url": "http://localhost:3000",
- "webRoot": "${workspaceRoot}/src",
- "userDataDir": "${workspaceRoot}/.vscode/chrome",
- "sourceMapPathOverrides": {
- "webpack:///src/*": "${webRoot}/*"
- }
- }]
-}
-```
-
-Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
-
-## Changing the Page ``
-
-You can find the source HTML file in the `public` folder of the generated project. You may edit the `` tag in it to change the title from “React App” to anything else.
-
-Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML.
-
-If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library.
-
-If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files).
-
-## Installing a Dependency
-
-The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
-
-```
-npm install --save
-```
-
-## Importing a Component
-
-This project setup supports ES6 modules thanks to Babel.
-While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead.
-
-For example:
-
-### `Button.js`
-
-```js
-import React, { Component } from 'react';
-
-class Button extends Component {
- render() {
- // ...
- }
-}
-
-export default Button; // Don’t forget to use export default!
-```
-
-### `DangerButton.js`
-
-
-```js
-import React, { Component } from 'react';
-import Button from './Button'; // Import a component from another file
-
-class DangerButton extends Component {
- render() {
- return ;
- }
-}
-
-export default DangerButton;
-```
-
-Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes.
-
-We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`.
-
-Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like.
-
-Learn more about ES6 modules:
-
-* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281)
-* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html)
-* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules)
-
-## Adding a Stylesheet
-
-This project setup uses [Webpack](https://webpack.github.io/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**:
-
-### `Button.css`
-
-```css
-.Button {
- padding: 20px;
-}
-```
-
-### `Button.js`
-
-```js
-import React, { Component } from 'react';
-import './Button.css'; // Tell Webpack that Button.js uses these styles
-
-class Button extends Component {
- render() {
- // You can use them as regular CSS styles
- return ;
- }
-}
-```
-
-**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack.
-
-In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output.
-
-If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool.
-
-## Post-Processing CSS
-
-This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it.
-
-For example, this:
-
-```css
-.App {
- display: flex;
- flex-direction: row;
- align-items: center;
-}
-```
-
-becomes this:
-
-```css
-.App {
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-orient: horizontal;
- -webkit-box-direction: normal;
- -ms-flex-direction: row;
- flex-direction: row;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
-}
-```
-
-If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling).
-
-## Adding a CSS Preprocessor (Sass, Less etc.)
-
-Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `` and `` components, we recommend creating a `